-
Notifications
You must be signed in to change notification settings - Fork 165
Clarification on how to create an Adapter for AWS Transcribe #108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @Gribbs, |
Hey @Gribbs, I had started throwing together an AWS adapter too, but I haven't got round to finishing it up yet. What sort of progress have you made so far? I'm keen to see this, so am happy to help if it's useful. |
hey @chrishutchinson, I've completed the implementation (might be a bit untidy in there with some cut and pasted files in the sample folder though) on my fork and seems to work ok. I haven't implemented speakers yet though. I also was a bit confused with how to use the generic generateEntitiesRanges() function on the Adapters guide: However, for Transcribe the "text" lives on an Object in each word like:
I figured I'd either have to remap each word or use my own implementation of generateEntitiesRanges() instead. I chose the latter. I'm not sure if I should be doing it different though? |
Sounds good @Gribbs, this is about as far as I got with my prototype. I ended up with similar questions but didn't make any progress resolving them. Perhaps it'd now be best to file a PR with what you have (or when you feel it's at a good point)? I'm happy to do some testing against it for my use case, and can contribute in any additional functionality with new PRs at that point. Having your base to work from would be really helpful. |
Thanks @Gribbs and @chrishutchinson Was looking at your branch and found the docs with example json for AWS transcribe so using this json example "items": [
{
"start_time": "12.282",
"end_time": "12.592",
"alternatives": [
{
"confidence": "1.0000",
"content": "When"
}
],
"type": "pronunciation"
},
{
"start_time": "12.592",
"end_time": "12.692",
"alternatives": [
{
"confidence": "0.8787",
"content": "you"
}
],
"type": "pronunciation"
},
{
"start_time": "12.702",
"end_time": "13.252",
"alternatives": [
{
"confidence": "0.8318",
"content": "try"
}
],
"type": "pronunciation"
}, The suggestion is that you could normalise the words/items list like this const words = items.map((item)=>{
return {
start: item.start_time,
end: item.end_time,
text: item.alternatives[0].content
}
})
/**
console.log(words);
[ { start: '12.282', end: '12.592', text: 'When' },
{ start: '12.592', end: '12.692', text: 'you' },
{ start: '12.702', end: '13.252', text: 'try' } ]
*/ Note, if there are items another minor note, if the highest normalising would enable you to re-use generateEntitiesRanges(paragraph.words, 'text') |
Great! That makes sense. Thanks for the suggestions @pietrop . Working on this now |
Awesome! Any questions let me know |
Pull request #110 |
Addressed in #120 |
I've forked the repo and I'm trying to create a new Adapter for AWS Transcribe formats but I'm having trouble understanding the recommended steps here https://github.com/bbc/react-transcript-editor/blob/master/docs/guides/adapters.md
The recommended steps are:
I can see an adapters folder in the project here src/lib/Util/adapters .
Is this where we should begin with step 1? I'm assuming yes, but just want to make sure this is right.
The text was updated successfully, but these errors were encountered: