-
Notifications
You must be signed in to change notification settings - Fork 0
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
Support translation of input audio to english #100
Conversation
… to transcript output files
… suffix to filenames
Exciting! |
packages/output-handler/src/index.ts
Outdated
@@ -74,11 +80,12 @@ const handleTranscriptionSuccess = async ( | |||
sesClient, | |||
config.app.emailNotificationFromAddress, | |||
transcriptionOutput.userEmail, | |||
`Transcription complete for ${transcriptionOutput.originalFilename}`, | |||
`Transcription ${transcriptionOutput.isTranslation ? 'english translation ' : ''}complete for ${transcriptionOutput.originalFilename}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you think about this?
`Transcription ${transcriptionOutput.isTranslation ? 'english translation ' : ''}complete for ${transcriptionOutput.originalFilename}`, | |
`${transcriptionOutput.isTranslation ? 'English translation' : 'Transcription'} complete for ${transcriptionOutput.originalFilename}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's a translation email we don't want subject to be "Transcription english translation complete..." right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and same for failure subject and message body?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm I was thinking that it's technically a translation of the transcription, but "transcription english translation is a bit of a mouthfull! I think your suggestion is clearer - it's kinda implicit that it's a transcription
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in 4767813
When you get the email saying the transcription (and translation?) is complete, and "Click here to export to a google doc", would it open both docs? Am wondering how people might get to each of the two documents... [ADD: ah, you get two emails. Sorry] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great use of 10%, nice work
What does this change?
The library we are using for transcription - whisper.cpp - supports translation to english.
This PR modifies the transcription tool to make use of this feature. A new checkbox is added to the submission form:
This value is sent through to the API. If true, then the API will send 2 messages rather than 1 to the queue. The extra message will have the same id but with
-translation
appended.The worker then proceeds as normal, but when it finishes and uploads the output text, if it's a translation then
-translation
is appended to each of the json/srt/txt filenames.The output handler modifies the email subject and message if it's a translation to indicate this:

The end result is that the user receives 2 emails. Whilst it would be nicer to have just one email with links to both docs, this approach means that they get the transcript as soon as possible, and we don't have to deal with any kind of state management of waiting for one or the other outputs.
How to test
Tested on CODE