-
Notifications
You must be signed in to change notification settings - Fork 13
Add support for second language #11
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
base: main
Are you sure you want to change the base?
Conversation
|
|
||
|
|
||
| ## Usage | ||
| To start transcription, press and hold the registered hotkey to start recording. To stop the recording, lift your registered hotkey. On macOS, the registered hotkey is the globe icon by default. For other operating systems, this will have to by manually configured in `main.py` as described earlier. |
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.
Please add back the usage section.
| transcriber = WhisperAPITranscriber.create() | ||
| # Set initial language from environment variable if provided | ||
| initial_language = os.getenv('UTTERTYPE_LANGUAGE', 'en') | ||
| transcriber.set_language(initial_language) |
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.
Would prefer if this is done in the APITranscriber class itself to keep main.py simple. One of the goals of the repo is also to keep things extremely readable, especially main.py.
| print(f"UtterType started with dual language support") | ||
| print(f"Primary language ({primary_lang.upper()}): {primary_key}") | ||
| print(f"Secondary language ({secondary_lang.upper()}): {secondary_key}") | ||
| print("Hold the respective hotkey to record in the corresponding language") |
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.
Could you also move these print statements and env fetches somewhere else? Perhaps in the default transcriber class?
|
Thanks for contributing to uttertype! Left some comments regarding style and some doc updates. |
Adds support for recording speech in two languages using separate hotkeys.
Configuration