mirror of
https://github.com/DinoMalin/paranoia-1.0.git
synced 2025-10-29 19:05:59 +00:00
remove useless file
This commit is contained in:
parent
ce49aac69c
commit
d9e9e898ef
22
speech.py
22
speech.py
@ -1,22 +0,0 @@
|
|||||||
import azure.cognitiveservices.speech as speechsdk
|
|
||||||
from dotenv import load_dotenv
|
|
||||||
import os
|
|
||||||
|
|
||||||
load_dotenv()
|
|
||||||
|
|
||||||
speech_config = speechsdk.SpeechConfig(
|
|
||||||
subscription=os.getenv("SPEECH_KEY"), region=os.getenv("REGION"))
|
|
||||||
speech_config.speech_recognition_language = "fr-FR"
|
|
||||||
|
|
||||||
audio_out = speechsdk.audio.AudioOutputConfig(use_default_speaker=True)
|
|
||||||
|
|
||||||
# A filthy shortcut because i have incomprehensible bugs with my libs.
|
|
||||||
# If your pc is normal unlike mine, consider replacing this argument with:
|
|
||||||
# use_default_microphone=True
|
|
||||||
audio_config = speechsdk.audio.AudioConfig(device_name="plughw:2,0") # fuck this man
|
|
||||||
|
|
||||||
speech_recognizer = speechsdk.SpeechRecognizer(speech_config=speech_config, audio_config=audio_config)
|
|
||||||
|
|
||||||
print("listen")
|
|
||||||
speech_recognition_result = speech_recognizer.recognize_once_async().get()
|
|
||||||
print(speech_recognition_result.text)
|
|
||||||
Loading…
Reference in New Issue
Block a user