Skip to content

Commit

Permalink
[webrtcvad_ros] support catkin_virtualenv
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Oct 14, 2024
1 parent 82e13cf commit 103d93d
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 4 deletions.
12 changes: 11 additions & 1 deletion webrtcvad_ros/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
cmake_minimum_required(VERSION 2.8.3)
project(webrtcvad_ros)

find_package(catkin REQUIRED)
find_package(catkin REQUIRED COMPONENTS catkin_virtualenv)

catkin_generate_virtualenv(
PYTHON_INTERPRETER python3
USE_SYSTEM_PACKAGES FALSE
CHECK_VENV FALSE
)

catkin_python_setup()

catkin_package()

catkin_install_python(PROGRAMS
node_scripts/vad.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
13 changes: 10 additions & 3 deletions webrtcvad_ros/launch/sample.launch
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<launch>
<arg name="aggressiveness" default="1" />

<include file="$(find audio_capture)/launch/capture.launch">
<arg name="format" value="wave"/>
</include>
Expand All @@ -9,8 +11,8 @@
type="vad.py"
output="screen"
>
<rosparam>
aggressiveness: 1
<rosparam subst_value="true">
aggressiveness: $(arg aggressiveness)
</rosparam>
<remap from="audio_data" to="/audio/audio"/>
<remap from="audio_info" to="/audio/audio_info"/>
Expand All @@ -25,7 +27,12 @@
<remap from="audio" to="/webrtcvad_ros/speech_audio"/>
<rosparam subst_value="true">
language: ja-JP
self_cancellation: false
self_cancellation: true
tts_actions_names:
- sound_play
- speed_play_jp
- robotsound
- robotsound_jp
tts_tolerance: 1.0
</rosparam>
</node>
Expand Down
Empty file modified webrtcvad_ros/node_scripts/vad.py
100755 → 100644
Empty file.
3 changes: 3 additions & 0 deletions webrtcvad_ros/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@

<buildtool_depend>catkin</buildtool_depend>

<build_depend>catkin_virtualenv</build_depend>

<exec_depend>audio_common_msgs</exec_depend>
<exec_depend>rospy</exec_depend>
<exec_depend>python-webrtcvad-pip</exec_depend>

<export>
<pip_requirements>requirements.txt</pip_requirements>
</export>
</package>
1 change: 1 addition & 0 deletions webrtcvad_ros/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
webrtcvad

0 comments on commit 103d93d

Please sign in to comment.