LoginSignup
3
0

More than 5 years have passed since last update.

Speech Editor

Last updated at Posted at 2017-12-25

Okkkkk! Finally Christmas is coming and today is my turn to share my idea on this advance calendar. First all of , Merry Christmas everyone! I hope you guys have a great day today. Ok , so now let's start. Today we are going to build a speech editor which you just say and let the computer type for you. You guys know what , since I was a kid, I have always trying to find a way to make thing done easy and could help other people do less work but get great results that is the reason why I choose software engineering as my college major. Before we start to talk about our project,please allow be to introduce myself first. My name is Visal a year 4 software engineering student at KIT. I think you guys know that as a student there is ton of assignments and typing those assignment is very time consuming. I always imagine that "What if there is someone who could type those assignment for me?", "What if I go to sleep and get up with those typing complete?". Because of that question I have come up with an idea with is speech editor or speech writer.You just say , the computer will type for you, wow isn't it amazing?My dream come true i guess hehe. Ok so today We are going to build only the core function of our application which is you say and computer type (We don't build the GUI sorry xD).
Ok let's start.

REQUIREMENT

  1. python 3.6
  2. pyaudio
  3. google speech recognition API

Step 1- Installing Requirement

If you are using mac follow this :

$ brew install portaudio
$ pip install pyaudio
$ pip install SpeechRecognition

If you are using Linux or Window follow this :


pip install pyaudio
pip install SpeechRecognition

Step 2- Start Building Our Core

import speech_recognition as sr
r = sr.Recognizer()
try:
with sr.Microphone() as mic:
        print("SAY : ")
        while True:
audio = r.listen(mic)
            print(r.recognize_google(audio))
except Exception as e:
print(e)

Step 3- Let's Test Our Program

Okkkkkkk! Now let's us run the program and start talking.
First of all let say "Merry Christmas"
Screen Shot 2017-12-25 at 9.27.42 AM.png

Bingo! It works like a charm.
OK guys that's it. Thank everyone for spending your precious time joining with me.Again , I hope you guys having a great great day. MERRY CHRISTMAS!

3
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0