Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Python voice recognition

import speech_recognition as sr
import sys
import winsound

def speech_listen():
    r = sr.Recognizer()
    audio = ""
    with sr.Microphone() as source:
        print("")
        print("Listening...")
        audio = r.listen(source, phrase_time_limit=15)
    print("Processing...")
    try:
        u_said = r.recognize_google(audio, language='en-US')
        print(f"(●) {u_said}")
        print("Processing...")

        return u_said
    except:
        print("Awaiting command.")
        return 0
Comment

PREVIOUS NEXT
Code Example
Python :: how to draw shape square in python turtle 
Python :: how to add row in spark dataframe 
Python :: limpiar consola en python 
Python :: plotly backend pandas 
Python :: import serial python 
Python :: get ip address in django 
Python :: solve system of linear equations numpy 
Python :: python datetime milliseconds 
Python :: sort value_counts output 
Python :: python colorama example 
Python :: package for downloading from youtybe for python 
Python :: install matplotlib pip 
Python :: username nextcord interactions 
Python :: python isprime 
Python :: python version kali linux 
Python :: jupyter notebook make new lines 
Python :: how to increase bar width in python matplogtlib 
Python :: python pandas series to dataframe 
Python :: python datetime difference in seconds 
Python :: how to check if a number is a perfect square python 
Python :: python tempfile 
Python :: python current working directory 
Python :: drf default pagination 
Python :: how to find no of times a elements in list python 
Python :: compute eigenvalue python 
Python :: drop duplicate rows pandas except nan 
Python :: colab pip 
Python :: pd get non-numeric columns 
Python :: python loop x times 
Python :: register temporary table pyspark 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =