Support OpenAI Whisper API Integration for Enhanced Transcription Flexibility #139
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: Support Additional Whisper Services (OpenAI Whisper API Integration)
Overview
This pull request addresses issue #137 from the GitHub repository for the grouplang secretary bot, focusing on enhancing the bot's transcription capabilities by integrating the OpenAI Whisper API as an additional voice transcription service. This integration aims to provide improved flexibility, performance, and cost-effectiveness for users depending on their needs.
Summary of Changes
The following key changes have been made:
Integration of OpenAI Whisper API:
OpenAITranscriber
class to manage audio transcription using the OpenAI Whisper API.Abstract Base Class for Transcription Services:
BaseTranscriber
that defines the common interface and shared functionality for various transcription services, including both AWS and OpenAI.Refactor of AWS Transcription Logic:
AWSTranscriber
class, enhancing code maintainability and clarity.Factory Pattern for Service Selection:
TranscriberFactory
which employs a factory design pattern to dynamically select and instantiate the appropriate transcriber based on the chosen service in the configuration settings.Configuration Updates:
TRANSCRIPTION_SERVICE
environment variable. Users can now easily switch between options ('aws' or 'openai') as needed.Bot Handler Modifications:
Documentation Revamp:
README.md
file to thoroughly document the new features, configuration settings, and API references, covering both the existing AWS service and the newly added OpenAI service.Next Steps
Please review the changes and provide feedback or approval to merge this integration into the main codebase. Thank you!