feat: Add Cohere Transcribe API support (recognize_cohere_api)#889
Merged
ftnext merged 3 commits intoUberi:masterfrom Mar 29, 2026
Merged
feat: Add Cohere Transcribe API support (recognize_cohere_api)#889ftnext merged 3 commits intoUberi:masterfrom
ftnext merged 3 commits intoUberi:masterfrom
Conversation
Implement speech_recognition.recognizers.cohere using cohere.ClientV2 and audio.transcriptions.create, with optional extra cohere-api (PyPI cohere>=5.21.0). Wire Recognizer.recognize_cohere, extend CI extras for resolver checks with openai/groq, add tests and document CO_API_KEY in README and library reference. Refs: Uberi#888 Made-with: Cursor
Contributor
There was a problem hiding this comment.
Pull request overview
Adds first-class support for Cohere’s Transcribe API as a new SpeechRecognition recognizer, including packaging/CI wiring and documentation so users can enable it via an optional extra.
Changes:
- Introduce
speech_recognition.recognizers.cohere_apiimplementingrecognize_cohere_api()viacohere.ClientV2().audio.transcriptions.create(...). - Wire
Recognizer.recognize_cohere_api, addcohere-apioptional extra, and extend CI to install it. - Add unit tests plus documentation updates (README + library reference) describing usage and
CO_API_KEY.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
speech_recognition/recognizers/cohere_api.py |
New Cohere Transcribe recognizer implementation using Cohere’s Python SDK. |
speech_recognition/__init__.py |
Wires the new recognizer onto Recognizer as recognize_cohere_api. |
pyproject.toml |
Adds cohere-api optional extra (cohere>=5.21.0). |
.github/workflows/unittests.yml |
Installs cohere-api extra in CI test matrix. |
tests/recognizers/test_cohere_api.py |
Adds tests validating the Cohere client call and parameters. |
README.rst |
Documents Cohere Transcribe support and installation/env var expectations. |
reference/library-reference.rst |
Adds API reference entry for recognize_cohere_api. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Align cohere_api with other recognizer modules (recognize + Recognizer.recognize_* wiring). Public API remains recognize_cohere_api. Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement speech_recognition.recognizers.cohere_api using cohere.ClientV2 and audio.transcriptions.create, with optional extra cohere-api (PyPI cohere>=5.21.0).
Wire Recognizer.recognize_cohere_api, extend CI extras for resolver checks with openai/groq, add tests and document CO_API_KEY in README and library reference.
Closes: #888
Made-with: Cursor
Usage
with
CO_API_KEY(Trial keys work)