Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable to change topic name from speech_recognition.launch #254

Merged
merged 1 commit into from Jun 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions ros_speech_recognition/launch/speech_recognition.launch
Expand Up @@ -3,6 +3,7 @@
<arg name="launch_audio_capture" default="true" doc="Launch audio_capture node to publish audio topic from microphone" />

<arg name="audio_topic" default="/audio" doc="Name of audio topic captured from microphone" />
<arg name="voice_topic" default="/Tablet/voice" doc="Name of text topic of recognized speech" />
<arg name="n_channel" default="1" doc="Number of channels of audio topic and microphone. '$ pactl list short sinks' to check your hardware" />
<arg name="depth" default="16" doc="Bit depth of audio topic and microphone. '$ pactl list short sinks' to check your hardware" />
<arg name="sample_rate" default="16000" doc="Frame rate of audio topic and microphone. '$ pactl list short sinks' to check your hardware"/>
Expand Down Expand Up @@ -37,6 +38,7 @@
output="screen">
<rosparam subst_value="true">
audio_topic: $(arg audio_topic)
voice_topic: $(arg voice_topic)
n_channel: $(arg n_channel)
depth: $(arg depth)
sample_rate: $(arg sample_rate)
Expand Down
2 changes: 1 addition & 1 deletion ros_speech_recognition/scripts/speech_recognition_node.py
Expand Up @@ -142,7 +142,7 @@ def __init__(self):
self.continuous = rospy.get_param("~continuous", False)
if self.continuous:
rospy.loginfo("Enabled continuous mode")
self.pub = rospy.Publisher("/Tablet/voice",
self.pub = rospy.Publisher(rospy.get_param("~voice_topic", "/Tablet/voice"),
SpeechRecognitionCandidates,
queue_size=1)
else:
Expand Down