Skip to content
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

add OpenAISTTService #459

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

joachimchauvet
Copy link
Contributor

This also works with OpenAI-compatible API providers such as Groq (requested in #254) by passing the base_url.

stt = OpenAISTTService(
    api_key=os.getenv("GROQ_API_KEY"),
    base_url="https://api.groq.com/openai/v1",
    model="distil-whisper-large-v3-en"
)

@aconchillo
Copy link
Contributor

@joachimchauvet Thank you!!! Any chance we can rebase and try this again?

@joachimchauvet joachimchauvet force-pushed the openai-stt branch 2 times, most recently from 42e366b to 47bb351 Compare October 1, 2024 09:36
@joachimchauvet
Copy link
Contributor Author

@aconchillo I rebased and updated to use the new SegmentedSTTService ;)

@@ -51,6 +50,8 @@ async def main():
),
)

stt = OpenAISTTService(api_key=os.getenv("OPENAI_API_KEY"), model="whisper-1")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should set transcription_enabled=False since we are using OpenAI's STT now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And we should enable audio passthrough vad_audio_passthrough=True so the audio can reach the STT.

@aconchillo
Copy link
Contributor

Thank you! Looks great! Added a couple of comments. Needs a rebase as well.

@aconchillo aconchillo self-assigned this Oct 12, 2024
@joachimchauvet joachimchauvet force-pushed the openai-stt branch 2 times, most recently from 113b9d8 to 474f06e Compare October 15, 2024 12:32
@joachimchauvet
Copy link
Contributor Author

joachimchauvet commented Oct 15, 2024

I updated but some files currently already in the repo were preventing the checks from passing. I think the main culprit was from the recently merged OpenAI realtime PR.
Let me know if you prefer me to exclude those @aconchillo

Edit: rebased on the most recent version that doesn't have formatting issues

@golbin
Copy link
Contributor

golbin commented Nov 8, 2024

@joachimchauvet I’m waiting.. 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants