Skip to content

Commit

Permalink
[docs] See openai.recognize()'s docstring (for future)
Browse files Browse the repository at this point in the history
  • Loading branch information
ftnext committed Dec 8, 2024
1 parent 64fe533 commit 8b77fb5
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions reference/library-reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -314,16 +314,10 @@ You can translate the result to english with Whisper by passing translate=True

Other values are passed directly to whisper. See https://github.com/openai/whisper/blob/main/whisper/transcribe.py for all options

``recognizer_instance.recognize_openai(audio_data: AudioData, model: str = "whisper-1", api_key: str | None = None)``
---------------------------------------------------------------------------------------------------------------------

Performs speech recognition on ``audio_data`` (an ``AudioData`` instance), using the OpenAI Whisper API.

This function requires an OpenAI account; visit https://platform.openai.com/signup, then generate API Key in `User settings <https://platform.openai.com/account/api-keys>`__.

Detail: https://platform.openai.com/docs/guides/speech-to-text
``recognizer_instance.recognize_openai(audio_data: AudioData, model = "whisper-1", **kwargs)``
----------------------------------------------------------------------------------------------

Raises a ``speech_recognition.exceptions.SetupError`` exception if there are any issues with the openai installation, or the environment variable is missing.
.. autofunction:: speech_recognition.recognizers.openai.recognize

``recognizer_instance.recognize_groq(audio_data: AudioData, model = "whisper-large-v3-turbo", **kwargs)``
---------------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit 8b77fb5

Please sign in to comment.