Skip to content

codeshef/Amazing-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Amazing Python

Text to Speech conversion

We can make the computer speak with Python. Given a text string, it will speak the written words in the English language. This process is called Text To Speech (TTS).

Pyttsx text to speech

Pyttsx is a cross-platform text-to-speech wrapper. It uses different speech engines based on your operating system

Install with pip :sudo pip install pyttsx

Here we use pyttsx but there are several other options:
  • using GTTS module
  • using ios TTS and speech recognition
  • Microsoft speech engine
  • IBM Watson TTS
  • Speech Recognition in Python using Google Speech API

    Speech recognition is the process of converting spoken words to text. Python supports many speech recognition engines and APIs, including Google Speech Engine, Google Cloud Speech API, Microsoft Bing Voice Recognition and IBM Speech to Text. Speech Recognition is an important feature in several applications used such as home automation, artificial intelligence, etc. This article aims to provide an introduction on how to make use of the SpeechRecognition library of Python. This is useful as it can be used on microcontrollers such as Raspberri Pis with the help of an external microphone.

    Required installations

    The following must be installed:

    1.Python Speech Recognition module:

    sudo pip install SpeechRecognition

    2.PyAudio:

    Use the following command for linux users sudo apt-get install python-pyaudio python3-pyaudio If the versions in the repositories are too old, install pyaudio using the following command

    sudo apt-get install portaudio19-dev python-all-dev python3-all-dev && sudo pip install pyaudio

    Use pip3 instead of pip for python3. Windows users can install pyaudio by executing the following command in a terminal

    pip install pyaudio

    Speech Recognition demo

    You can test the speech recognition module, with the command:

    python -m speech_recognition

    About

    python script for converting text to speech and speech to text

    Resources

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

    No packages published

    Languages