From 934c21d99f1da10743e146634f147f7352baa41c Mon Sep 17 00:00:00 2001 From: Capri2014 Date: Fri, 31 Jul 2020 16:47:32 -0700 Subject: [PATCH] Audio: add mic to recorded message and topic rename --- modules/audio/conf/audio_conf.pb.txt | 2 +- modules/audio/dag/audio.dag | 2 +- modules/audio/tools/audiosaver.py | 2 +- modules/drivers/microphone/conf/respeaker.pb.txt | 2 +- scripts/record_bag.py | 1 + 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/audio/conf/audio_conf.pb.txt b/modules/audio/conf/audio_conf.pb.txt index 514303aed3..5ad2e815bf 100644 --- a/modules/audio/conf/audio_conf.pb.txt +++ b/modules/audio/conf/audio_conf.pb.txt @@ -1,4 +1,4 @@ topic_conf { - audio_data_topic_name: "/apollo/microphone" + audio_data_topic_name: "/apollo/sensor/microphone" audio_detection_topic_name: "/apollo/audio_detection" } diff --git a/modules/audio/dag/audio.dag b/modules/audio/dag/audio.dag index 0301a4aacf..f636bdd252 100644 --- a/modules/audio/dag/audio.dag +++ b/modules/audio/dag/audio.dag @@ -8,7 +8,7 @@ module_config { flag_file_path: "/apollo/modules/audio/conf/audio.conf" readers: [ { - channel: "/apollo/microphone" + channel: "/apollo/sensor/microphone" qos_profile: { depth : 1 } diff --git a/modules/audio/tools/audiosaver.py b/modules/audio/tools/audiosaver.py index ae208c81bc..46b761e6c0 100644 --- a/modules/audio/tools/audiosaver.py +++ b/modules/audio/tools/audiosaver.py @@ -21,7 +21,7 @@ import wave from cyber.python.cyber_py3 import cyber from modules.drivers.microphone.proto.audio_pb2 import AudioData -RESPEAKER_CHANNEL = "/apollo/microphone" +RESPEAKER_CHANNEL = "/apollo/sensor/microphone" WAV_SAVING_PATH = "/tmp" diff --git a/modules/drivers/microphone/conf/respeaker.pb.txt b/modules/drivers/microphone/conf/respeaker.pb.txt index b9fbe0a5f6..43eec8556b 100644 --- a/modules/drivers/microphone/conf/respeaker.pb.txt +++ b/modules/drivers/microphone/conf/respeaker.pb.txt @@ -3,7 +3,7 @@ chunk: 1024 sample_rate: 16000 record_seconds: 6 sample_width: 2 -channel_name: "/apollo/microphone" +channel_name: "/apollo/sensor/microphone" frame_id: "respeaker" channel_type: ASR channel_type: RAW diff --git a/scripts/record_bag.py b/scripts/record_bag.py index 97e60caa50..3ff5ef06d4 100755 --- a/scripts/record_bag.py +++ b/scripts/record_bag.py @@ -82,6 +82,7 @@ SMALL_TOPICS = [ '/apollo/sensor/gnss/rtk_eph', '/apollo/sensor/gnss/rtk_obs', '/apollo/sensor/gnss/heading', + '/apollo/sensor/microphone', '/apollo/sensor/mobileye', '/apollo/storytelling', '/tf', -- GitLab