Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/inforkgodara/python-speech-to-text
A few lines of code which convert speech to text.
https://github.com/inforkgodara/python-speech-to-text
inforkgodara pyaudio python python-script python-speech python-speech-to-text speech-recognition speech-to-text speech-to-text-script speechtotext
Last synced: 6 days ago
JSON representation
A few lines of code which convert speech to text.
- Host: GitHub
- URL: https://github.com/inforkgodara/python-speech-to-text
- Owner: inforkgodara
- Created: 2020-08-23T12:55:20.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-08-23T12:56:00.000Z (over 4 years ago)
- Last Synced: 2024-10-30T08:21:10.525Z (about 2 months ago)
- Topics: inforkgodara, pyaudio, python, python-script, python-speech, python-speech-to-text, speech-recognition, speech-to-text, speech-to-text-script, speechtotext
- Language: Python
- Homepage:
- Size: 0 Bytes
- Stars: 1
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Python Speech To Text
A few lines of code written in python using libraries (SpeechRecognition, PyAudio) that convert speech to text.
## Prerequisites
In order to run the python script, your system must have the following programs/packages installed.
* Python 3.6.7
* SpeechRecognition 3.8.1 (Internet required to convert speech to text while execution)
* PyAudio## Approach
* script.py execute in terminal.
* After a printed start in the terminal, you begin to speak in English and end once your sentence is completed.
* It will take a few minutes to convert speech to text and print on your terminal.## Code
```
# Program to convert speech to text
# Author @inforkgodaraimport speech_recognition as sr
r = sr.Recognizer()mic = sr.Microphone()
print('start')
with mic as source:
audio = r.listen(source)
print('end')
print(r.recognize_google(audio))
```