diff options
author | Anuj Solanki <anuj603362@gmail.com> | 2024-09-30 23:39:02 +0200 |
---|---|---|
committer | Anuj Solanki <anuj603362@gmail.com> | 2024-10-06 16:25:15 +0200 |
commit | 8949e1b030da7067da206a580c5124ca85ec9fbc (patch) | |
tree | 9eec1daea3ded33862a310aa66e83864acf8abc2 /meta-offline-voice-agent/recipes-assistant/voiceagent-service | |
parent | 1feb55631bea43bf7745921e247706303db4d6fc (diff) |
Remove OpenAI's Whisper AI and its dependencies
- Remove OpenAI's Whisper AI recipes and all its dependencies.
- Add recipes for whisper-cpp, whisper-cpp-base and whisper-cpp-tiny
model.
- Add recipe for python-mpd.
- Add voice-agent-config to /etc/default and update config path in
agl-service-voiceagent.service
Bug-AGL: SPEC-5200
Change-Id: Iaebd9c46930144b41659710202e9b737dbe9f60b
Signed-off-by: Anuj Solanki <anuj603362@gmail.com>
Diffstat (limited to 'meta-offline-voice-agent/recipes-assistant/voiceagent-service')
3 files changed, 59 insertions, 7 deletions
diff --git a/meta-offline-voice-agent/recipes-assistant/voiceagent-service/agl-service-voiceagent_git.bb b/meta-offline-voice-agent/recipes-assistant/voiceagent-service/agl-service-voiceagent_git.bb index e1f1cc50..aedab006 100644 --- a/meta-offline-voice-agent/recipes-assistant/voiceagent-service/agl-service-voiceagent_git.bb +++ b/meta-offline-voice-agent/recipes-assistant/voiceagent-service/agl-service-voiceagent_git.bb @@ -1,11 +1,12 @@ SUMMARY = "A gRPC-based voice agent service designed for Automotive Grade Linux (AGL)." -HOMEPAGE = "https://github.com/malik727/agl-service-voiceagent" +.HOMEPAGE = "https://github.com/malik727/agl-service-voiceagent" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=4202492ed9afcab3aaecc4a9ec32adb2" SRC_URI = " \ - file://agl-service-voiceagent.service \ git://gerrit.automotivelinux.org/gerrit/apps/agl-service-voiceagent;protocol=https;branch=${AGL_BRANCH} \ + file://agl-service-voiceagent.service \ + file://voice-agent-config.ini \ " SRCREV = "${AUTOREV}" @@ -15,7 +16,7 @@ S = "${WORKDIR}/git" VOSK_STT_MODEL_NAME ?= "vosk-model-small-en-us-0.15" # Wake Word Detection Model Name VOSK_WWD_MODEL_NAME ?= "vosk-model-small-en-us-0.15" -WAKE_WORD ?= "hello auto" +WAKE_WORD ?= "hey automotive" DEPENDS += " \ python3 \ @@ -53,8 +54,12 @@ do_install:append() { # Initialize our service definition if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then install -d ${D}${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/agl-service-voiceagent.service ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/agl-service-voiceagent.service ${D}${systemd_system_unitdir}/agl-service-voiceagent.service fi + + # Copy config file to etc/default + install -d ${D}/etc/default/ + cp -R ${WORKDIR}/voice-agent-config.ini ${D}/etc/default/ } RDEPENDS:${PN} += " \ @@ -65,7 +70,8 @@ RDEPENDS:${PN} += " \ kuksa-client \ python3-snips-inference-agl \ vosk \ - whisper \ + whisper-cpp \ + python3-python-mpd2 \ " -FILES:${PN} += "/usr/share/nlu/" +FILES:${PN} += "/usr/share/nlu/ /etc/default/" diff --git a/meta-offline-voice-agent/recipes-assistant/voiceagent-service/files/agl-service-voiceagent.service b/meta-offline-voice-agent/recipes-assistant/voiceagent-service/files/agl-service-voiceagent.service index b4d738f8..af08b42e 100644 --- a/meta-offline-voice-agent/recipes-assistant/voiceagent-service/files/agl-service-voiceagent.service +++ b/meta-offline-voice-agent/recipes-assistant/voiceagent-service/files/agl-service-voiceagent.service @@ -3,7 +3,7 @@ Description=AGL Voice Agent Service After=network.target [Service] -ExecStart=/usr/bin/voiceagent-service run-server --default +ExecStart=/usr/bin/voiceagent-service run-server --config /etc/default/voice-agent-config.ini Restart=always [Install] diff --git a/meta-offline-voice-agent/recipes-assistant/voiceagent-service/files/voice-agent-config.ini b/meta-offline-voice-agent/recipes-assistant/voiceagent-service/files/voice-agent-config.ini new file mode 100644 index 00000000..e4f63130 --- /dev/null +++ b/meta-offline-voice-agent/recipes-assistant/voiceagent-service/files/voice-agent-config.ini @@ -0,0 +1,46 @@ +[General] +base_audio_dir = /usr/share/nlu/commands/ +vosk_model_path = /usr/share/vosk/vosk-model-small-en-us-0.15/ +whisper_model_path = /usr/share/whisper/tiny.pt +whisper_cpp_path = /usr/bin/whisper-cpp +whisper_cpp_model_path = /usr/share/whisper-cpp/models/tiny.en.bin +wake_word_model_path = /usr/share/vosk/vosk-model-small-en-us-0.15/ +snips_model_path = /usr/share/nlu/snips/model/ +channels = 1 +sample_rate = 16000 +bits_per_sample = 16 +wake_word = hey automotive +server_port = 51053 +server_address = 127.0.0.1 +rasa_model_path = /usr/share/nlu/rasa/models/ +rasa_server_port = 51054 +rasa_detached_mode = 1 +base_log_dir = /usr/share/nlu/logs/ +store_voice_commands = 0 +online_mode = 0 +online_mode_address = 65.108.107.216 +online_mode_port = 50051 +online_mode_timeout = 15 +mpd_ip = 127.0.0.1 +mpd_port = 6600 + +[Kuksa] +ip = 127.0.0.1 +port = 55555 +protocol = grpc +insecure = 0 +token = /usr/lib/python3.12/site-packages/kuksa_certificates/jwt/super-admin.json.token +tls_server_name = Server + +[VSS] +hostname = localhost +port = 55555 +protocol = grpc +insecure = 0 +token_filename = /etc/xdg/AGL/agl-vss-helper/agl-vss-helper.token +ca_cert_filename = /etc/kuksa-val/CA.pem +tls_server_name = Server + +[Mapper] +intents_vss_map = /usr/share/nlu/mappings/intents_vss_map.json +vss_signals_spec = /usr/share/nlu/mappings/vss_signals_spec.json |