Skip to content

Commit

Permalink
[style] Docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
ftnext committed Dec 30, 2024
1 parent e9ce763 commit c0ccb9e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
3 changes: 1 addition & 2 deletions speech_recognition/recognizers/google.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,7 @@ def recognize_legacy(
*,
endpoint: str = ENDPOINT,
):
"""
Performs speech recognition on ``audio_data`` (an ``AudioData`` instance), using the Google Speech Recognition API.
"""Performs speech recognition on ``audio_data`` (an ``AudioData`` instance), using the Google Speech Recognition API.
The Google Speech Recognition API key is specified by ``key``. If not specified, it uses a generic key that works out of the box. This should generally be used for personal or testing purposes only, as it **may be revoked by Google at any time**.
Expand Down
3 changes: 1 addition & 2 deletions speech_recognition/recognizers/whisper_api/groq.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ def recognize(
model: GroqModel = "whisper-large-v3-turbo",
**kwargs: Unpack[GroqOptionalParameters],
) -> str:
"""
Performs speech recognition on ``audio_data`` (an ``AudioData`` instance), using the Groq Whisper API.
"""Performs speech recognition on ``audio_data`` (an ``AudioData`` instance), using the Groq Whisper API.
This function requires login to Groq; visit https://console.groq.com/login, then generate API Key in `API Keys <https://console.groq.com/keys>`__ menu.
Expand Down
3 changes: 1 addition & 2 deletions speech_recognition/recognizers/whisper_api/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ def recognize(
model: WhisperModel = "whisper-1",
**kwargs: Unpack[OpenAIOptionalParameters],
) -> str:
"""
Performs speech recognition on ``audio_data`` (an ``AudioData`` instance), using the OpenAI Whisper API.
"""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>`__.
Expand Down
3 changes: 1 addition & 2 deletions speech_recognition/recognizers/whisper_local/whisper.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ def recognize(
load_options: LoadModelOptionalParameters | None = None,
**transcribe_options: Unpack[TranscribeOptionalParameters],
) -> str | TranscribeOutput:
"""
Performs speech recognition on ``audio_data`` (an ``AudioData`` instance), using Whisper.
"""Performs speech recognition on ``audio_data`` (an ``AudioData`` instance), using Whisper.
Pick ``model`` from output of :command:`python -c 'import whisper; print(whisper.available_models())'`.
See also https://github.com/openai/whisper?tab=readme-ov-file#available-models-and-languages.
Expand Down

0 comments on commit c0ccb9e

Please sign in to comment.