-
Notifications
You must be signed in to change notification settings - Fork 202
Enrich Transcription/Translation Data with Detected Language and Original Text #364
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
Enrich Transcription/Translation Data with Detected Language and Original Text #364
Conversation
…w fields for detected language and original text.
…into add-translation-stream-metadata
👷 Deploy request for augmentos-appstore pending review.Visit the deploys page to approve it
|
👷 Deploy request for augmentos-developer-portal pending review.Visit the deploys page to approve it
|
|
This is ready for review |
|
Looking great. Let's get translation using this end to end and then merge it up once we have a TPA (translation) that is successfully using. |
|
I have implemented the change in the translation app so now it utilizes this to only show translations when appropriate: Mentra-Community/LiveTranslationOnSmartGlasses#2 @CaydenPierce |
Closes #363
This pull request enhances the data provided in translation stream to let Third-Party Applications (TPAs) Now the original language of a segment as well as the original text. This will allow apps to only translate text that is actually in a different language.
Problem Solved:
Previously, TPAs subscribing to translation streams couldn't easily determine if a translation actually occurred (vs. source and target languages being the same) or what the originally detected language was if it differed from the requested source language. Similarly, transcription streams didn't report the language detected by the underlying speech service. This made it harder for TPAs to build robust and context-aware features.
Changes Implemented:
SDK Interface Updates (
packages/sdk):detectedLanguage?: stringandoriginalText?: stringfields toTranslationData.Cloud Service Logic Updates (
packages/cloud):TranscriptionService(setupRecognitionHandlersForInstancemethod):detectedLanguagefield inTranslationDataobject.event.result.textand populates theoriginalTextfield inTranslationData.Backward Compatibility:
These changes are fully backward compatible. Existing TPAs consuming
TranslationDatawill continue to work without modification, as the new fields (detectedLanguage,originalText) are optional and will simply be ignored if not used by the TPA.Testing:
I have tested this manually in my development environment. At the moment there are not any automated tests.