Add Support for OpenAI Whisper API as Alternative Transcription Service (Issue #137) #150
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.
Pull Request Description
Background
This pull request addresses issue #137, titled "support additional whisper services (focus on openai whisper api)", which can be viewed here. The objective of this enhancement is to integrate the OpenAI Whisper API as an additional transcription backend in the existing Telegram bot. This functionality will complement the current AWS Transcribe service, providing users with more options and flexibility regarding transcription performance, cost-effectiveness, and personalization based on individual needs.
Summary of Changes
This PR implements significant updates to the transcription capabilities of the Telegram bot. Specifically, the changes include:
Introduction of New Transcription Services:
OpenAITranscriptionService
.AWSTranscriptionService
.TranscriptionService
to standardize the interface across various transcription services.Service Architecture Update:
Environment Configuration:
TRANSCRIPTION_SERVICE
environment variable to either'aws'
or'openai'
. By default, the system will utilize AWS Transcribe if no preference is indicated.AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
.OPENAI_API_KEY
.Documentation Updates:
Dependency Management:
Next Steps
To utilize this new functionality, please ensure that the environment variables are accurately configured to reflect the desired transcription service. Once set up, you can run the bot to test and confirm that both AWS Transcribe and OpenAI transcription services function as intended.
Feel free to reach out if any questions or further assistance are needed. Thank you for considering this enhancement!