MCPcopy Index your code
hub / github.com/geekcomputers/Python / stt

Function stt

VoiceAssistant/Project_Basic_struct/speechtotext.py:7–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5
6
7def stt():
8 with sr.Microphone() as source:
9 # read the audio data from the default microphone
10 audio_data = r.record(source, duration=5)
11 print("Recognizing...")
12 # convert speech to text
13 text = r.recognize_google(audio_data)
14 print(text)

Callers

nothing calls this directly

Calls 1

recordMethod · 0.80

Tested by

no test coverage detected