Add option to select STT engine per project #191
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Frontend: ohcnetwork/ayushma_fe#47
This PR adds the ability to select the speech-to-text (STT) engine per Ayushma project. Previously, Ayushma was using Whisper as the default STT engine.
With this change:
A new
stt_engine
field is added to Project model, with choices of "google" and "whisper". The default is still "whisper".The converse API now uses the selected STT engine to transcribe audio.
A new
STT_API_KEY
environment variable is introduced for Google Cloud STT API key.A speech_to_text.py utils file is added to contain the logic for different STT engines.
Related migrations, model and serializer changes are done.
This adds more flexibility by allowing projects to choose between Whisper and Google Cloud for speech transcription.
Once merged, new projects can choose between whisper and google STT engines. Existing projects will continue using whisper by default.