You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's one set of guidelines for how translation could work in the project
Translation is only available when a live transcript is public, and happens on the Observe.html page but never the main live transcript. That should always be in the speaker's language, because:
Translations will happen at the level of lines themselves, that Yandex has some context for how to translate each word. Edits to the original transcript should cause the entire line containing that word to be retranslated on the observer's page.
This will create a lot of API calls to Yandex, and maybe when a line has been translated, we should cache it in the database until some word within it is edited and then cache the new translation. But this would possibly create an even greater impact in terms of firebase calls because we'd have to increase the nesting to provide multiple languages at the "line" level... so it is too soon to worry about this.
The UI things we need for translation on the observe.html page would be:
Dropdown listing all languages supported by Yandex
"Translate" toggle.
The JS functionality we need is:
Track what target language is selected.
Track the source language. This is not currently declared on the main input page, but should be. Web Speech Recognition API just needs to be told what language it is listening to, and it will do so. So we have to gather, and store that info. Or Yandex can guess.
Track whether we are currently translating or not.
If we are translating, grab incoming lines from the DB and make the API call to Yandex for each line.
Insert the results from the Yandex call into the same span elements we are using for snippets when not translating.
If translation is turned off, skip all the yandex stuff, but do not go back and update content that was already translated. New stuff just gets handled as normal.
This seems like a good starting point.
The text was updated successfully, but these errors were encountered:
Here's one set of guidelines for how translation could work in the project
The UI things we need for translation on the observe.html page would be:
The JS functionality we need is:
span
elements we are using for snippets when not translating.This seems like a good starting point.
The text was updated successfully, but these errors were encountered: