Skip to content

Commit

Permalink
[jsk_spot_startup] add front microphone (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
sktometometo committed Sep 28, 2021
1 parent 48bab7a commit 56d8db0
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<arg name="speech_recognition_language" default="japanese" />
<arg name="speech_recognition_network" default="online" />

<arg name="audio_topic" default="/speech_audio" />
<arg name="audio_topic" default="/webrtcvad_ros/speech_audio" />

<!-- sound_play for english -->
<node pkg="sound_play" type="soundplay_node.py" name="sound_play" respawn="true">
Expand Down
37 changes: 36 additions & 1 deletion jsk_spot_robot/jsk_spot_startup/launch/include/peripheral.launch
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<launch>
<arg name="use_insta_360" default="true"/>
<arg name="use_respeaker" default="true"/>
<arg name="use_front_mirophone" default="true"/>

<!-- insta360 -->
<include
Expand All @@ -17,6 +18,40 @@
type="respeaker_node.py"
name="respeaker_node"
if="$(arg use_respeaker)"
/>
>
<remap from="is_speeching" to="/respeaker_node/is_speeching"/>
<remap from="sound_direction" to="/respeaker_node/sound_direction"/>
<remap from="sound_localization" to="/respeaker_node/sound_localization"/>
<remap from="sound_audio" to="/respeaker_node/sound_audio"/>
<remap from="speech_audio" to="/respeaker_node/speech_audio"/>
</node>

<!-- front microphone -->
<node
pkg="audio_capture"
type="audio_capture"
name="audio_capture"
>
<rosparam subst_value="true">
bitrate: 128
device: default
channels: 1
sample_rate: 16000
sample_format: S16LE
format: wave
</rosparam>
</node>
<node
pkg="webrtcvad_ros"
type="webrtcvad_ros.py"
name="webrtcvad_ros"
>
<rosparam>
aggressiveness: 1
minimum_duration: 0.5
</rosparam>
<remap from="audio_info" to="/audio_info" />
<remap from="audio_data" to="/audio" />
</node>

</launch>

0 comments on commit 56d8db0

Please sign in to comment.