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

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

DATA TYPES OF PYTHON

DATA TYPES OF PYTHON.PYTHON DATA TYPE. PYTHON DATA TYPE 1.  STRING DATA TYPE. 2.  INTEGER DATA TYPE. 3.  LIST DATA TYPE. 4.  TUPLE DATA TYPE. 5.  DICTIONARY DATA TYPE. 6.  BOOLEAN DATA TYPE. EXAMPLE: 1. a = "Hello World"----------------------------------------->>>>> str 2. b = 20---------------------------------------------------->>>>> int 3. c = ["apple", "banana", "cherry"]------------------------->>>>> list 4. d = ("apple", "banana", "cherry")------------------------->>>>> tuple 5. e = {"name" : "John", "age" : 36}------------------------->>>>> dict 6. f = True-------------------------------------------------->>>>> bool  NOTE:    You can get the data type of any object by using the  type()  function which is inbuilt function of python. T...