As part of this PR: #3620 breaking changes were made to how captions are emitted in the events. This broke the Transcriptions in the plugin-meetings
by making the following changes
Change everything to new payload structure
Add timestamp in new payload for Voicea final captions
Update voicea and SDK tests in plugin-meetings
We also have refactored a util method,
Earlier, we were processing NEW_CAPTIONS in two data formats, isFinal:true came with "transcript" object while isFinal:false came with "transcripts" array
Now, the breaking change has aligned such that we always get only "transcripts" array
Therefore, this method now performs all the caption processing on "transcripts" array and only does the needed changes based on "isFinal" boolean. This means that we process isFinal:false as an interim caption while isFinal:true as final caption thereby removing the interim caption once we receive the final caption for the respective transcriptId
Additionally, we also made changes to emitting spoken and caption languages as follows,
Earlier, the processing of spoken language and caption language wasn't accurate and this PR fixes it based on the SDK value of the caption language they had chosen earlier or set it from what the new caption event responds if not chosen via the SDK already
Change Type
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Documentation update
[ ] Tooling change
[x] Internal code refactor
The following scenarios where tested
Ensured all the unit tests passed locally
Tested out from the Kitchen Sink app by enabling transcription and seeing if the live captions are generated without any errors
Set the Spoken Language to Hindi and spoke in Hindi. This translated the Caption from whatever I spoke in Hindi to English
Similarly set the Spoken Language back to English and the Caption language to Hindi. This translated the caption to Hindi from whatever I spoke in English. Verified the translation with Google Translate also
COMPLETES SPARK-533905
This pull request addresses
As part of this PR: #3620 breaking changes were made to how captions are emitted in the events. This broke the Transcriptions in the plugin-meetings
by making the following changes
plugin-meetings
isFinal:true
came with "transcript" object whileisFinal:false
came with "transcripts" arrayisFinal:false
as an interim caption whileisFinal:true
as final caption thereby removing the interim caption once we receive the final caption for the respectivetranscriptId
Change Type
The following scenarios where tested
I certified that
[x] I have read and followed contributing guidelines
[x] I discussed changes with code owners prior to submitting this pull request
[x] I have not skipped any automated checks
[x] All existing and new tests passed
[x] I have updated the documentation accordingly
Make sure to have followed the contributing guidelines before submitting.