Skip to main content

SPEECH RECOGNITION USING PYTHON-SPEECH TO TEXT OR SPEECH

PYTHON SPEECH TO TEXT OR SPEECH-RECOGNITION USING PYTHON :



STEP -1 :
            
 PYTHON LIBRARIES
                 
  1.    Speech_Recognition.(pip install SpeechRecognition)
      Note : You Must Connect To The Internet


Step#2: 

       Open your favorite IDE, we are choosing IDLE , and  write the below code:

    
       For English Language:
  
              import speech_recognition as sr

              r=sr.Recognizer()

              with sr.Microphone() as source:
                    print("Listening......")
                    audio=r.listen(source)
                    print("Done")


               try:
                   print("You said :",r.recognize_google(audio))

              except:
                   print("Sorry,I didn't Catch That")












  For Hindi Language:
  
              import speech_recognition as sr

              r=sr.Recognizer()

              with sr.Microphone() as source:
                    print("Listening......")
                    audio=r.listen(source)
                    print("Done")


               try:
                   print("You said :",r.recognize_google(audio, language='HI-IN'))

              except:
                   print("Sorry,I didn't Catch That")





  For Bengali Language:
  
              import speech_recognition as sr

              r=sr.Recognizer()

              with sr.Microphone() as source:
                    print("Listening......")
                    audio=r.listen(source)
                    print("Done")


               try:
                   print("You said :",r.recognize_google(audio, language='BN-IN'))

              except:
                   print("Sorry,I didn't Catch That")











THIS IS THE WAY TO YOU CAN CONVERT SPEECH TO TEXT IN PYTHON.

Comments

Popular posts from this blog

PYTHON : SUM OF TWO NUMBER IN PYTHON

SUM OF TWO NUMBER IN PYTHON.HOW TO SUM OF TWO NUMBERS IN PYTHON. JUST WRITE AND RUN THIS CODE fname = int(input("Enter First number:")) snumber = int(input("Enter Second Number :")) sum = fname+snumber print("Sum is",sum) IN THIS WAY WE CAN SUM OF NUMBERS

FIRST PYTHON CODE-HELLO WORLD

HELLO WORLD IN PYTHON.HOW TO WRITE FIRST PYTHON CODE-HELLO WORLD FIRST YOU NEED TO INSTALL PYTHON :                                           PYTHON DOWNLOAD AFTER DOWNLOAD AND INSTALL OPEN IDLE AND ADD THIS CODE:                                                                                   PRINT("HELLO WORLD") THEN RUN YOU GOT THE RESULT THIS THE WAY TO YOU CAN WRITE FIRST PROGRAMME HELLO WORLD IN JAVA

Hello World in java

       Hello World in java First create a class.Here the class name is Demo.Then Create the main method which is  represents the starting point of the program.On the main class use print statement to print something using "  System.out.println()". The Code Is:   public class Demo { public static void main(String args[]) { System.out.println("Hello world"); } }