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

Updated to the latest OpenAI API changes, and fixed #720 #729

Merged
merged 3 commits into from
Mar 28, 2024

Conversation

yackermann
Copy link
Contributor

@yackermann yackermann commented Jan 14, 2024

In November OpenAI released version 1.0 that deprecated a lot of old API.

These changes addresses issues raised in #720 and fixes now completely broken recognize_whisper_api API.

@zielony
Copy link

zielony commented Jan 24, 2024

Hi @herrjemand, could you please look into this PR? I've tested the change myself, and it works fine on my end as well.

@yackermann
Copy link
Contributor Author

@zielony What do you want me to look at?

@zielony
Copy link

zielony commented Jan 30, 2024

@zielony What do you want me to look at?

At this PR, and if it's ok for you, could you please merge it? It would help multiple users using your library, as Whisper API integration currently does not work.

@yackermann
Copy link
Contributor Author

yackermann commented Jan 30, 2024 via email

@zielony
Copy link

zielony commented Jan 30, 2024

Sorry, I looked at the wrong nickname, wanted to mention @Uberi - are you able to merge this to master, please?

@xmnlab
Copy link

xmnlab commented Feb 18, 2024

it would be great to have this PR merged.

@ftnext
Copy link
Collaborator

ftnext commented Mar 28, 2024

Thanks for this pull request.
Sorry for late response.

It works:

pip install -e .
pip install openai
>>> import speech_recognition as sr
>>> recognizer = sr.Recognizer()
>>> with sr.AudioFile("tests/english.wav") as source:
...   audio = recognizer.record(source)
>>> recognizer.recognize_whisper_api(audio)
'1, 2, 3.'

@ftnext
Copy link
Collaborator

ftnext commented Mar 28, 2024

@herrjemand Thanks a lot.
I have renamed the variable names in the code to align with the name in the OpenAI's documentation.
https://platform.openai.com/docs/guides/speech-to-text/transcriptions

@ftnext ftnext merged commit 4a5b375 into Uberi:master Mar 28, 2024
4 checks passed
This was referenced Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug whisper Features related to Whisper
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants