MCPcopy Create free account
hub / github.com/geekcomputers/Python / callback

Function callback

VoiceRepeater/__main__.py:14–20  ·  view source on GitHub ↗
(recognizer, audio)

Source from the content-addressed store, hash-verified

12
13
14def callback(recognizer, audio):
15 with open("spoken/" + str(len(speeches)) + ".wav", "wb") as file:
16 file.write(audio.get_wav_data())
17
18 playsound.playsound("spoken/" + str(len(speeches)) + ".wav")
19 speeches.append(1)
20 print("____")
21
22
23r = sr.Recognizer()

Callers

nothing calls this directly

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected