From 5a8f670c3f772cfe0345ed53e5989a6dca08a905 Mon Sep 17 00:00:00 2001 From: Anuj Solanki Date: Tue, 1 Oct 2024 00:32:40 +0530 Subject: Remove OpenAI's Whisper AI and Bug Fixing - Removed OpenAI's Whisper AI from agl-service-voiceagent and using whisper.cpp for speech-to-text. - Fix audio_recorder. - Update grpc protoc to include the online-mode status in ServiceStatus - Set online_mode flag default to 0 - Change wake word to "hey automotive" Bug-AGL: SPEC-5200 Change-Id: I9f1629cdcaef43498bf4cb9fdd950291a415819d Signed-off-by: Anuj Solanki --- agl_service_voiceagent/utils/audio_recorder.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'agl_service_voiceagent/utils/audio_recorder.py') diff --git a/agl_service_voiceagent/utils/audio_recorder.py b/agl_service_voiceagent/utils/audio_recorder.py index 49716c9..e362480 100644 --- a/agl_service_voiceagent/utils/audio_recorder.py +++ b/agl_service_voiceagent/utils/audio_recorder.py @@ -64,7 +64,7 @@ class AudioRecorder: """ print("Creating pipeline for audio recording in {} mode...".format(self.mode)) self.pipeline = Gst.Pipeline() - autoaudiosrc = Gst.ElementFactory.make("autoaudiosrc", None) + autoaudiosrc = Gst.ElementFactory.make("alsasrc", None) queue = Gst.ElementFactory.make("queue", None) queue.set_property("max-size-buffers", 0) queue.set_property("max-size-bytes", 0) @@ -109,6 +109,7 @@ class AudioRecorder: Start recording audio using the GStreamer pipeline. """ self.pipeline.set_state(Gst.State.PLAYING) + self.loop.run() print("Recording Voice Input...") @@ -186,3 +187,4 @@ class AudioRecorder: print("Pipeline cleanup complete!") self.bus = None self.pipeline = None + self.loop.quit() \ No newline at end of file -- cgit 1.2.3-korg