-
Notifications
You must be signed in to change notification settings - Fork 14
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
[WIP] Add language selection for streaming with whisper + Improve tests #48
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: AudranBert <[email protected]>
Signed-off-by: AudranBert <[email protected]>
Signed-off-by: AudranBert <[email protected]>
whisper/stt/processing/streaming.py
Outdated
@@ -43,17 +44,20 @@ async def wssDecode(ws: WebSocketServerProtocol, model_and_alignementmodel): | |||
try: | |||
config = json.loads(res)["config"] | |||
sample_rate = config["sample_rate"] | |||
language = config.get("language", None) |
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.
Don't we need to update the doc, specifying the language can be specified in the configuration of the streaming request?
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.
Also, why not to support language="*
" (as in the env variable for the language in offline decoding)
that would need to replace "*" by None when reading the config
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.
Don't we need to update the doc, specifying the language can be specified in the configuration of the streaming request?
Yes I need to update the doc
Signed-off-by: AudranBert <[email protected]>
Signed-off-by: AudranBert <[email protected]>
Signed-off-by: AudranBert <[email protected]>
Signed-off-by: AudranBert <[email protected]>
Could you clarify the list of supported languages? For example, does it include "en," "fr," etc.? On the LinTO side, we consistently use BCP-47 codes for language representation. |
Add language selection for streaming with whisper, by default it will take the language found in the env settings. But you can pass a language in the config when starting streaming.
The PR is also improving tests to add tests about languages. Also removing some useless ones in order to reduce testing duration.
It also adds the possibility to pass a language in the config in case of offline decoding. It will enable having a same model instance used for multiple languages instead of launching another Docker.