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 Whisper STT service using OpenAI API #1128

Merged
merged 4 commits into from
Feb 8, 2025

Conversation

golbin
Copy link
Contributor

@golbin golbin commented Feb 4, 2025

This patch originates from #459 but has been stuck for a while, so I created this version with a small fix.

await self.start_ttfb_metrics()

response: Transcription = await self._client.audio.transcriptions.create(
file=("audio.wav", audio, "audio/wav"), model=self.model_name
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this save a file to disk? We should not add that by default, probably an argument to the constructor, like save_audio_file: Optional[str]: None.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ooops, duh! Sorry, I misread the code!

@aconchillo
Copy link
Contributor

LGTM! @golbin Do you mind fixing the conflicts? 🙏

@golbin
Copy link
Contributor Author

golbin commented Feb 6, 2025

@aconchillo I resolved the conflict

@golbin
Copy link
Contributor Author

golbin commented Feb 8, 2025

@aconchillo everything OK?

@markbackman
Copy link
Contributor

Thanks @golbin!

@markbackman markbackman merged commit d678619 into pipecat-ai:main Feb 8, 2025
4 checks passed
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