sound_drivers: compressed_audio_streaming | sound_play
Package Summary
compressed_audio_streaming is a utility for streaming audio data from a remote microphone to a local computer. Gstreamer is used to capture, encode (MP3), transmit, receive, decode, and play the audio data. The server side (where the microphone is located) uses the gstream_server.py script or server.launch. The client side (where the audio is played) uses the gstream_client.py or client.launch. Streaming stereo audio data consumes roughly 30KiB of bandwidth (measured very coarsley), and on a local network one can expect around 0.5s delay between server and client.
- Author: Nate Koenig
- License: BSD
- Repository: ros-pkg
- Source: svn https://code.ros.org/svn/ros-pkg/stacks/sound_drivers/trunk/compressed_audio_streaming
Contents
Usage
The transmission of audio data takes place outside of the ROS communication system. Knowledge of hostnames and ports is provided to the server and client scripts via parameters. The server and client scripts both require a client_host and client_port. If both scripts are run on the same machine client_host can be set to localhost.
Example launch file for the server:
<launch>
<node name="gstream_server" pkg="compressed_audio_streaming" type="gstream_server.py" output="screen">
<param name="client_host" value="localhost"/>
<param name="client_port" value="3000"/>
</node>
</launch>Example launch file for the client:
<launch>
<node name="gstream_client" pkg="compressed_audio_streaming" type="gstream_client.py" output="screen">
<param name="client_host" value="localhost"/>
<param name="client_port" value="3000"/>
</node>
</launch>Once the launch files are created, start the server on the machine which has the microphones
roslaunch compressed_audio_streaming server.launch
Finally, start the client on the machine which is to receive the audio stream
roslaunch compressed_audio_streaming client.launch
Audio Devices
The server records from the default audio input, and the client plays to the default audio output.






