skillfed

SpeechRecognition

Library for performing speech recognition, with support for several engines and APIs, online and offline.

speechrecognition v3.17.0 11.7M downloads/30d#1,367 on PyPI8,985
Permissive license BSD-3-Clause Active released

What it is and what it does

SpeechRecognition is a Python library that wraps multiple speech recognition engines and APIs into a unified interface. It supports both online services (Google, OpenAI Whisper, Azure, IBM, Groq, Cohere) and offline engines (CMU Sphinx, Vosk, local Whisper models), letting you choose based on accuracy, latency, and privacy needs. The library handles microphone input, audio file transcription, and audio stream processing.

The core use case is converting spoken audio to text in Python applications. You instantiate a Recognizer, load audio from a microphone or file, and call the appropriate recognition method for your chosen engine. Optional dependencies are only required for specific engines—the base install is lightweight. Python 3.9+ is required, and PyAudio is only needed if you want live microphone input.

Use it for:

  • Build a voice command interface that listens to a microphone and executes actions based on recognized speech.
  • Transcribe recorded audio files or meeting recordings using offline or cloud-based speech recognition.
  • Create a chatbot or voice assistant that accepts spoken input and processes it as text.
  • Implement accessibility features that convert user speech to text for applications.
  • Prototype speech recognition workflows by switching between different engines without rewriting code.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Performs speech recognition and transcription using multiple online and offline engines, including Google, OpenAI Whisper, CMU Sphinx, and others.

Yes. The package is actively maintained, has low install friction, supports modern Python versions (3.9+), carries no known vulnerabilities, and offers a practical abstraction over many speech engines. The permissive BSD-3-Clause license poses no restrictions. Install it when you need speech recognition and want to avoid vendor lock-in or when you want to experiment with multiple engines. The main gotcha is that most engines require optional dependencies or API credentials.

Install

speechrecognition on PyPI

pip

pip install speechrecognition

uv

uv add speechrecognition

poetry

poetry add speechrecognition

Installing SpeechRecognition

Before you install

Low install friction with a pure-Python wheel distribution. Actively maintained with a recent release (2026-06-17) and strong community engagement (8985 GitHub stars). Runtime dependencies are minimal; optional features require additional packages only when needed.

License in practice

BSD-3-Clause permissive license allows commercial and private use with minimal restrictions, making it suitable for most projects.

Quickstart

pip install SpeechRecognition

from SpeechRecognition import Recognizer, Microphone

recognizer = Recognizer()
with Microphone() as source:
    audio = recognizer.listen(source)

PyAudio 0.2.11+ is required only if you need microphone input; file-based transcription works without it. Most recognition engines require additional packages and API credentials.

Verify before relying

  • Whether all listed engines (Google, Wit.ai, Azure, Houndify, IBM, Groq, Cohere) remain actively supported or if some are deprecated.
  • Performance characteristics and accuracy differences between offline engines (Sphinx, Vosk, Whisper) and online APIs.
  • Whether PyAudio 0.2.11+ is available on all target platforms or if installation barriers exist on some systems.

Package facts

License BSD-3-Clause (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 3 — typing-extensions, standard-aifc, audioop-lts
Maintenance actively maintained — 58 days since the last release
Last repo commit
First released
Downloads 11,744,922/month — #1,367 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: speechrecognition-3.17.0-py3-none-any.whl

Keywords: speech, recognition, voice, sphinx, google, wit, api, houndify, ibm, snowboy

Development Status :: 5 - Production/StableIntended Audience :: DevelopersNatural Language :: EnglishOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: Other OSOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Multimedia :: Sound/Audio :: SpeechTopic :: Software Development :: Libraries :: Python Modules

Tags

speech recognition libraryaudio transcription pythonvoice to textspeech to text apioffline speech recognitionmicrophone audio inputwhisper transcription
audio-processingspeech-to-textmulti-engine

More Python Modules packages