Skip to content

One-click setup for Speech-to-Text πŸŽ™οΈ. Installs Python, checks Git, creates venv, installs dependencies, and runs main automatically. Simplify voice recognition with Google Web Speech API.

License

Notifications You must be signed in to change notification settings

AnubhavChaturvedi-GitHub/Speech-to-Text-with-Python-Google-Web-Speech-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

36 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ™οΈ Speech-to-Text (Google Web Speech API)

A simple Speech-to-Text (STT) system in Python using the SpeechRecognition library and Google’s Web Speech API. It listens to your microphone, sends the audio to Google’s cloud recognizer, and prints the transcribed text.


✨ Features

  • 🎀 Capture live audio from your microphone.
  • ☁️ Cloud-based transcription using Google’s Web Speech API.
  • ⚑ Real-time transcription with minimal setup.
  • πŸ› οΈ Minimal Python dependencies for quick prototyping.

πŸ“‚ Project Structure

β”œβ”€β”€ stt_speechrecognition.py         # Main script (run this)
β”œβ”€β”€ requirements_speechrecognition.txt  # Python dependencies
β”œβ”€β”€ README.md                        # Documentation (this file)

πŸš€ Getting Started

1. Prerequisites

  • Python 3.8+

  • A working microphone

  • Internet connection (required for Google Web Speech API)

  • System audio backend:

    • macOS:

      brew install portaudio
    • Ubuntu/Debian:

      sudo apt-get install portaudio19-dev python3-pyaudio
    • Windows: Download PyAudio wheels from here and install with pip install <wheel-file>.


2. Installation

Clone or download this repo, then install dependencies:

pip install -r requirements_speechrecognition.txt

3. Usage

Run the script:

python stt_speechrecognition.py

Steps:

  1. The program adjusts for background noise.
  2. Speak into your microphone.
  3. The recognized text is printed to the terminal.

⚠️ Notes & Limitations

  • Requires an active internet connection (Google Web Speech API).
  • API is free but limited (not suitable for very large-scale transcription).
  • For offline transcription, consider using OpenAI Whisper.

πŸ“Œ Example Output

πŸŽ™οΈ  Adjusting for ambient noise...
βœ… Ready. Speak now!
πŸ“ You said: Hello world, this is my Jarvis project!

πŸ› οΈ Next Steps

Enhance your project by adding:

  • Wake word detection (e.g., β€œJarvis”).
  • Text-to-Speech (TTS) for voice responses.
  • Custom commands (open apps, fetch info, control IoT devices).

πŸ“„ License

This project is licensed under the MIT License β€” free to use, modify, and distribute.

About

One-click setup for Speech-to-Text πŸŽ™οΈ. Installs Python, checks Git, creates venv, installs dependencies, and runs main automatically. Simplify voice recognition with Google Web Speech API.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published