Amazing-Python-Scripts/Audio to Text Convertor at main · SgtXesh/Amazing-Python-Scripts · GitHub
Skip to content

Latest commit

 

History

History
 
 

Folders and files

README.md

Speech to Text Conversion

This Python script demonstrates how to convert audio input into text using the speech_recognition library. It utilizes the recognize_google function from the library to convert the speech into text.

Prerequisites

  • Python
  • speech_recognition library (install using pip install SpeechRecognition)
  • pyaudio library (install using pip install pyaudio)

Note: The pyaudio library is required for microphone access and recording audio.

Usage

  1. Ensure that you have a working microphone connected to your computer.
  2. Run the script and speak into the microphone when prompted.
  3. The script will convert the audio to text using the Google Speech Recognition service.
  4. If the speech is recognized, the converted text will be displayed.
  5. Now, you can do whatever operations you want with the input text.

Feel free to use this code as a starting point for your speech-to-text conversion tasks.