Package Summary

Tags No category tags.
Version 1.2.15
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/jsk-ros-pkg/jsk_recognition.git
VCS Type git
VCS Version master
Last Updated 2022-12-14
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Convert audio (audio_common_msgs/AudioData) to spectrogram (sensor_msgs/Image)

Additional Links

No additional links.

Maintainers

  • Naoya Yamaguchi

Authors

No additional authors.

audio_to_spectrogram

This package converts audio data to spectrum and spectrogram data.

Usage

By following command, you can publish audio, spectrum and spectrogram topics. Please set correct args for your microphone configuration, such as mic_sampling_rate or bitdepth.

roslaunch audio_to_spectrogram audio_to_spectrogram.launch

Here is an example using rosbag with 300Hz audio.

roslaunch audio_to_spectrogram sample_audio_to_spectrogram.launch

Audio Amplitude Spectrum Spectrogram

Scripts

audio_to_spectrum.py

A script to convert audio to spectrum.

  • Publishing topics

    • ~spectrum (jsk_recognition_msgs/Spectrum)

    Spectrum data calculated from audio by FFT.

  • Subscribing topics

    • audio (audio_common_msgs/AudioData)

    Audio stream data from microphone. The audio format must be wave.

  • Parameters

    • ~mic_sampling_rate (Int, default: 16000)

    Sampling rate [Hz] of microphone. Namely, sampling rate of audio topic. - ~fft_sampling_period (Double, default: 0.3)

    Period [s] to sample audio data for one FFT. - ~n_channel (Int, default: 1)

    Number of channel of microphone. - ~target_channel (Int, default: 0)

    Target channel. - ~bitdepth (Int, default: 16)

    Number of bits per audio data. - ~high_cut_freq (Int, default: 800)

    Threshold to limit the maximum frequency of the output spectrum. - ~low_cut_freq (Int, default: 1)

    Threshold to limit the minimum frequency of the output spectrum.

spectrum_to_spectrogram.py

A script to convert spectrum to spectrogram.

  • Publishing topics

    • ~spectrogram (sensor_msgs/Image)

    Spectrogram data, which is concatenation of spectrum in time series. Image format is 32FC1.

  • Subscribing topics

    • ~spectrum (jsk_recognition_msgs/Spectrum)

    Spectrum data calculated from audio by FFT.

  • Parameters

    • ~image_height (Int, default: 300)

    Number of vertical (frequency axis) pixels in output spectrogram. - ~image_width (Int, default: 300)

    Number of horizontal (time axis) pixels in output spectrogram. - ~spectrogram_period (Double, default: 5)

    Period [s] to store spectrum data to create one spectrogram topic. - ~publish_rate (Double, default: image_width / spectrogram_period)

    Publish rate [Hz] of spectrogram topic.

audio_amplitude_plot.py

A script to publish audio amplitude plot image.

  • Publishing topics

    • ~output/viz (sensor_msgs/Image)

    Audio amplitude plot image.

  • Subscribing topics

    • ~audio (audio_common_msgs/AudioData)

    Audio stream data from microphone. The audio format must be wave.

  • Parameters

    • ~mic_sampling_rate (Int, default: 16000)

    Sampling rate [Hz] of microphone. Namely, sampling rate of audio topic. - ~n_channel (Int, default: 1)

    Number of channel of microphone. - ~target_channel (Int, default: 0)

    Target channel. - ~bitdepth (Int, default: 16)

    Number of bits per audio data. - ~maximum_amplitude (Int, default: 10000)

    Maximum range of amplitude to plot. - ~window_size (Double, default: 10.0)

    Window size of sound input to plot. - ~rate (Double, default: 10.0)

    Publish rate [Hz] of audio amplitude image topic.

spectrum_plot.py

A script to publish frequency vs amplitude plot image.

  • Publishing topics

    • ~output/viz (sensor_msgs/Image)

    Frequency vs amplitude plot image.

  • Subscribing topics

    • ~spectrum (jsk_recognition_msgs/Spectrum)

    Spectrum data calculated from audio by FFT.

CHANGELOG

Changelog for package audio_to_spectrogram

1.2.15 (2020-10-10)

1.2.14 (2020-10-09)

1.2.13 (2020-10-08)

1.2.12 (2020-10-03)

1.2.11 (2020-10-01)

  • Fix for noetic / 20.04 (#2507)
  • [audio_to_spectrogram] Enable multi channel input by retrieving single channel data (#2514)
  • [audio_to_spectrogram] Add README for usage and scripts interface (#2498)
    • [audio_to_spectrogram] Add README for usage and scripts interface
    • [audio_to_spectrogram] add args to audio_to_spectrogram.launch
    • [audio_to_spectrogram] Add arg to run audio_capture
  • Convert audio data to spectrogram (#2478)
    • Make audio_to_spectrogram as ROS package
  • Contributors: Kei Okada, Naoya Yamaguchi, Shingo Kitagawa

1.2.10 (2019-03-27)

1.2.9 (2019-02-23)

1.2.8 (2019-02-22)

1.2.7 (2019-02-14)

1.2.6 (2018-11-02)

1.2.5 (2018-04-09)

1.2.4 (2018-01-12)

1.2.3 (2017-11-23)

1.2.2 (2017-07-23)

1.2.1 (2017-07-15 20:44)

1.2.0 (2017-07-15 09:14)

1.1.3 (2017-07-07)

1.1.2 (2017-06-16)

1.1.1 (2017-03-04)

1.1.0 (2017-02-09 22:50)

1.0.4 (2017-02-09 22:48)

1.0.3 (2017-02-08)

1.0.2 (2017-01-12)

1.0.1 (2016-12-13)

1.0.0 (2016-12-12)

0.3.29 (2016-10-30)

0.3.28 (2016-10-29 16:34)

0.3.27 (2016-10-29 00:14)

0.3.26 (2016-10-27)

0.3.25 (2016-09-16)

0.3.24 (2016-09-15)

0.3.23 (2016-09-14)

0.3.22 (2016-09-13)

0.3.21 (2016-04-15)

0.3.20 (2016-04-14)

0.3.19 (2016-03-22)

0.3.18 (2016-03-21)

0.3.17 (2016-03-20)

0.3.16 (2016-02-11)

0.3.15 (2016-02-09)

0.3.14 (2016-02-04)

0.3.13 (2015-12-19 17:35)

0.3.12 (2015-12-19 14:44)

0.3.11 (2015-12-18)

0.3.10 (2015-12-17)

0.3.9 (2015-12-14)

0.3.8 (2015-12-08)

0.3.7 (2015-11-19)

0.3.6 (2015-09-11)

0.3.5 (2015-09-09)

0.3.4 (2015-09-07)

0.3.3 (2015-09-06)

0.3.2 (2015-09-05)

0.3.1 (2015-09-04 17:12)

0.3.0 (2015-09-04 12:37)

0.2.18 (2015-09-04 01:07)

0.2.17 (2015-08-21)

0.2.16 (2015-08-19)

0.2.15 (2015-08-18)

0.2.14 (2015-08-13)

0.2.13 (2015-06-11)

0.2.12 (2015-05-04)

0.2.11 (2015-04-13)

0.2.10 (2015-04-09)

0.2.9 (2015-03-29)

0.2.7 (2015-03-26)

0.2.6 (2015-03-25)

0.2.5 (2015-03-17)

0.2.4 (2015-03-08)

0.2.3 (2015-02-02)

0.2.2 (2015-01-30)

0.2.0 (2015-01-29 12:20)

0.1.34 (2015-01-29 11:53)

0.1.33 (2015-01-24)

0.1.32 (2015-01-12)

0.1.31 (2015-01-08)

0.1.30 (2014-12-24 16:45)

0.1.29 (2014-12-24 12:43)

0.1.28 (2014-12-17)

0.1.27 (2014-12-09)

0.1.26 (2014-11-23)

0.1.25 (2014-11-21)

0.1.24 (2014-11-15)

0.1.23 (2014-10-09)

0.1.22 (2014-09-24)

0.1.21 (2014-09-20)

0.1.20 (2014-09-17)

0.1.19 (2014-09-15)

0.1.18 (2014-09-13)

0.1.17 (2014-09-07)

0.1.16 (2014-09-04)

0.1.15 (2014-08-26)

0.1.14 (2014-08-01)

0.1.13 (2014-07-29)

0.1.12 (2014-07-24)

0.1.11 (2014-07-08)

0.1.10 (2014-07-07)

0.1.9 (2014-07-01)

0.1.8 (2014-06-29)

0.1.7 (2014-05-31)

0.1.6 (2014-05-30)

0.1.5 (2014-05-29)

0.1.4 (2014-04-25)

0.1.3 (2014-04-12)

0.1.2 (2014-04-11)

0.1.1 (2014-04-10)

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Launch files

  • sample/sample_audio_to_spectrogram.launch
    • data flow
      • gui [default: true]
      • filename [default: $(find audio_to_spectrogram)/sample/data/audio_300hz.bag]
  • launch/audio_to_spectrogram.launch
    • data flow
      • launch_audio_capture [default: true]
      • bitdepth [default: 16]
      • mic_sampling_rate [default: 16000]
      • n_channel [default: 1]
      • device [default: hw:0,0]
      • audio_topic [default: /audio]
      • high_cut_freq [default: 800]
      • low_cut_freq [default: 1]
      • spectrogram_period [default: 5]
      • gui [default: true]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged audio_to_spectrogram at answers.ros.org

Package Summary

Tags No category tags.
Version 1.2.15
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/jsk-ros-pkg/jsk_recognition.git
VCS Type git
VCS Version master
Last Updated 2022-12-14
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Convert audio (audio_common_msgs/AudioData) to spectrogram (sensor_msgs/Image)

Additional Links

No additional links.

Maintainers

  • Naoya Yamaguchi

Authors

No additional authors.

audio_to_spectrogram

This package converts audio data to spectrum and spectrogram data.

Usage

By following command, you can publish audio, spectrum and spectrogram topics. Please set correct args for your microphone configuration, such as mic_sampling_rate or bitdepth.

roslaunch audio_to_spectrogram audio_to_spectrogram.launch

Here is an example using rosbag with 300Hz audio.

roslaunch audio_to_spectrogram sample_audio_to_spectrogram.launch

Audio Amplitude Spectrum Spectrogram

Scripts

audio_to_spectrum.py

A script to convert audio to spectrum.

  • Publishing topics

    • ~spectrum (jsk_recognition_msgs/Spectrum)

    Spectrum data calculated from audio by FFT.

  • Subscribing topics

    • audio (audio_common_msgs/AudioData)

    Audio stream data from microphone. The audio format must be wave.

  • Parameters

    • ~mic_sampling_rate (Int, default: 16000)

    Sampling rate [Hz] of microphone. Namely, sampling rate of audio topic. - ~fft_sampling_period (Double, default: 0.3)

    Period [s] to sample audio data for one FFT. - ~n_channel (Int, default: 1)

    Number of channel of microphone. - ~target_channel (Int, default: 0)

    Target channel. - ~bitdepth (Int, default: 16)

    Number of bits per audio data. - ~high_cut_freq (Int, default: 800)

    Threshold to limit the maximum frequency of the output spectrum. - ~low_cut_freq (Int, default: 1)

    Threshold to limit the minimum frequency of the output spectrum.

spectrum_to_spectrogram.py

A script to convert spectrum to spectrogram.

  • Publishing topics

    • ~spectrogram (sensor_msgs/Image)

    Spectrogram data, which is concatenation of spectrum in time series. Image format is 32FC1.

  • Subscribing topics

    • ~spectrum (jsk_recognition_msgs/Spectrum)

    Spectrum data calculated from audio by FFT.

  • Parameters

    • ~image_height (Int, default: 300)

    Number of vertical (frequency axis) pixels in output spectrogram. - ~image_width (Int, default: 300)

    Number of horizontal (time axis) pixels in output spectrogram. - ~spectrogram_period (Double, default: 5)

    Period [s] to store spectrum data to create one spectrogram topic. - ~publish_rate (Double, default: image_width / spectrogram_period)

    Publish rate [Hz] of spectrogram topic.

audio_amplitude_plot.py

A script to publish audio amplitude plot image.

  • Publishing topics

    • ~output/viz (sensor_msgs/Image)

    Audio amplitude plot image.

  • Subscribing topics

    • ~audio (audio_common_msgs/AudioData)

    Audio stream data from microphone. The audio format must be wave.

  • Parameters

    • ~mic_sampling_rate (Int, default: 16000)

    Sampling rate [Hz] of microphone. Namely, sampling rate of audio topic. - ~n_channel (Int, default: 1)

    Number of channel of microphone. - ~target_channel (Int, default: 0)

    Target channel. - ~bitdepth (Int, default: 16)

    Number of bits per audio data. - ~maximum_amplitude (Int, default: 10000)

    Maximum range of amplitude to plot. - ~window_size (Double, default: 10.0)

    Window size of sound input to plot. - ~rate (Double, default: 10.0)

    Publish rate [Hz] of audio amplitude image topic.

spectrum_plot.py

A script to publish frequency vs amplitude plot image.

  • Publishing topics

    • ~output/viz (sensor_msgs/Image)

    Frequency vs amplitude plot image.

  • Subscribing topics

    • ~spectrum (jsk_recognition_msgs/Spectrum)

    Spectrum data calculated from audio by FFT.

CHANGELOG

Changelog for package audio_to_spectrogram

1.2.15 (2020-10-10)

1.2.14 (2020-10-09)

1.2.13 (2020-10-08)

1.2.12 (2020-10-03)

1.2.11 (2020-10-01)

  • Fix for noetic / 20.04 (#2507)
  • [audio_to_spectrogram] Enable multi channel input by retrieving single channel data (#2514)
  • [audio_to_spectrogram] Add README for usage and scripts interface (#2498)
    • [audio_to_spectrogram] Add README for usage and scripts interface
    • [audio_to_spectrogram] add args to audio_to_spectrogram.launch
    • [audio_to_spectrogram] Add arg to run audio_capture
  • Convert audio data to spectrogram (#2478)
    • Make audio_to_spectrogram as ROS package
  • Contributors: Kei Okada, Naoya Yamaguchi, Shingo Kitagawa

1.2.10 (2019-03-27)

1.2.9 (2019-02-23)

1.2.8 (2019-02-22)

1.2.7 (2019-02-14)

1.2.6 (2018-11-02)

1.2.5 (2018-04-09)

1.2.4 (2018-01-12)

1.2.3 (2017-11-23)

1.2.2 (2017-07-23)

1.2.1 (2017-07-15 20:44)

1.2.0 (2017-07-15 09:14)

1.1.3 (2017-07-07)

1.1.2 (2017-06-16)

1.1.1 (2017-03-04)

1.1.0 (2017-02-09 22:50)

1.0.4 (2017-02-09 22:48)

1.0.3 (2017-02-08)

1.0.2 (2017-01-12)

1.0.1 (2016-12-13)

1.0.0 (2016-12-12)

0.3.29 (2016-10-30)

0.3.28 (2016-10-29 16:34)

0.3.27 (2016-10-29 00:14)

0.3.26 (2016-10-27)

0.3.25 (2016-09-16)

0.3.24 (2016-09-15)

0.3.23 (2016-09-14)

0.3.22 (2016-09-13)

0.3.21 (2016-04-15)

0.3.20 (2016-04-14)

0.3.19 (2016-03-22)

0.3.18 (2016-03-21)

0.3.17 (2016-03-20)

0.3.16 (2016-02-11)

0.3.15 (2016-02-09)

0.3.14 (2016-02-04)

0.3.13 (2015-12-19 17:35)

0.3.12 (2015-12-19 14:44)

0.3.11 (2015-12-18)

0.3.10 (2015-12-17)

0.3.9 (2015-12-14)

0.3.8 (2015-12-08)

0.3.7 (2015-11-19)

0.3.6 (2015-09-11)

0.3.5 (2015-09-09)

0.3.4 (2015-09-07)

0.3.3 (2015-09-06)

0.3.2 (2015-09-05)

0.3.1 (2015-09-04 17:12)

0.3.0 (2015-09-04 12:37)

0.2.18 (2015-09-04 01:07)

0.2.17 (2015-08-21)

0.2.16 (2015-08-19)

0.2.15 (2015-08-18)

0.2.14 (2015-08-13)

0.2.13 (2015-06-11)

0.2.12 (2015-05-04)

0.2.11 (2015-04-13)

0.2.10 (2015-04-09)

0.2.9 (2015-03-29)

0.2.7 (2015-03-26)

0.2.6 (2015-03-25)

0.2.5 (2015-03-17)

0.2.4 (2015-03-08)

0.2.3 (2015-02-02)

0.2.2 (2015-01-30)

0.2.0 (2015-01-29 12:20)

0.1.34 (2015-01-29 11:53)

0.1.33 (2015-01-24)

0.1.32 (2015-01-12)

0.1.31 (2015-01-08)

0.1.30 (2014-12-24 16:45)

0.1.29 (2014-12-24 12:43)

0.1.28 (2014-12-17)

0.1.27 (2014-12-09)

0.1.26 (2014-11-23)

0.1.25 (2014-11-21)

0.1.24 (2014-11-15)

0.1.23 (2014-10-09)

0.1.22 (2014-09-24)

0.1.21 (2014-09-20)

0.1.20 (2014-09-17)

0.1.19 (2014-09-15)

0.1.18 (2014-09-13)

0.1.17 (2014-09-07)

0.1.16 (2014-09-04)

0.1.15 (2014-08-26)

0.1.14 (2014-08-01)

0.1.13 (2014-07-29)

0.1.12 (2014-07-24)

0.1.11 (2014-07-08)

0.1.10 (2014-07-07)

0.1.9 (2014-07-01)

0.1.8 (2014-06-29)

0.1.7 (2014-05-31)

0.1.6 (2014-05-30)

0.1.5 (2014-05-29)

0.1.4 (2014-04-25)

0.1.3 (2014-04-12)

0.1.2 (2014-04-11)

0.1.1 (2014-04-10)

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Launch files

  • sample/sample_audio_to_spectrogram.launch
    • data flow
      • gui [default: true]
      • filename [default: $(find audio_to_spectrogram)/sample/data/audio_300hz.bag]
  • launch/audio_to_spectrogram.launch
    • data flow
      • launch_audio_capture [default: true]
      • bitdepth [default: 16]
      • mic_sampling_rate [default: 16000]
      • n_channel [default: 1]
      • device [default: hw:0,0]
      • audio_topic [default: /audio]
      • high_cut_freq [default: 800]
      • low_cut_freq [default: 1]
      • spectrogram_period [default: 5]
      • gui [default: true]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged audio_to_spectrogram at answers.ros.org

Package Summary

Tags No category tags.
Version 1.2.15
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/jsk-ros-pkg/jsk_recognition.git
VCS Type git
VCS Version master
Last Updated 2022-12-14
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Convert audio (audio_common_msgs/AudioData) to spectrogram (sensor_msgs/Image)

Additional Links

No additional links.

Maintainers

  • Naoya Yamaguchi

Authors

No additional authors.

audio_to_spectrogram

This package converts audio data to spectrum and spectrogram data.

Usage

By following command, you can publish audio, spectrum and spectrogram topics. Please set correct args for your microphone configuration, such as mic_sampling_rate or bitdepth.

roslaunch audio_to_spectrogram audio_to_spectrogram.launch

Here is an example using rosbag with 300Hz audio.

roslaunch audio_to_spectrogram sample_audio_to_spectrogram.launch

Audio Amplitude Spectrum Spectrogram

Scripts

audio_to_spectrum.py

A script to convert audio to spectrum.

  • Publishing topics

    • ~spectrum (jsk_recognition_msgs/Spectrum)

    Spectrum data calculated from audio by FFT.

  • Subscribing topics

    • audio (audio_common_msgs/AudioData)

    Audio stream data from microphone. The audio format must be wave.

  • Parameters

    • ~mic_sampling_rate (Int, default: 16000)

    Sampling rate [Hz] of microphone. Namely, sampling rate of audio topic. - ~fft_sampling_period (Double, default: 0.3)

    Period [s] to sample audio data for one FFT. - ~n_channel (Int, default: 1)

    Number of channel of microphone. - ~target_channel (Int, default: 0)

    Target channel. - ~bitdepth (Int, default: 16)

    Number of bits per audio data. - ~high_cut_freq (Int, default: 800)

    Threshold to limit the maximum frequency of the output spectrum. - ~low_cut_freq (Int, default: 1)

    Threshold to limit the minimum frequency of the output spectrum.

spectrum_to_spectrogram.py

A script to convert spectrum to spectrogram.

  • Publishing topics

    • ~spectrogram (sensor_msgs/Image)

    Spectrogram data, which is concatenation of spectrum in time series. Image format is 32FC1.

  • Subscribing topics

    • ~spectrum (jsk_recognition_msgs/Spectrum)

    Spectrum data calculated from audio by FFT.

  • Parameters

    • ~image_height (Int, default: 300)

    Number of vertical (frequency axis) pixels in output spectrogram. - ~image_width (Int, default: 300)

    Number of horizontal (time axis) pixels in output spectrogram. - ~spectrogram_period (Double, default: 5)

    Period [s] to store spectrum data to create one spectrogram topic. - ~publish_rate (Double, default: image_width / spectrogram_period)

    Publish rate [Hz] of spectrogram topic.

audio_amplitude_plot.py

A script to publish audio amplitude plot image.

  • Publishing topics

    • ~output/viz (sensor_msgs/Image)

    Audio amplitude plot image.

  • Subscribing topics

    • ~audio (audio_common_msgs/AudioData)

    Audio stream data from microphone. The audio format must be wave.

  • Parameters

    • ~mic_sampling_rate (Int, default: 16000)

    Sampling rate [Hz] of microphone. Namely, sampling rate of audio topic. - ~n_channel (Int, default: 1)

    Number of channel of microphone. - ~target_channel (Int, default: 0)

    Target channel. - ~bitdepth (Int, default: 16)

    Number of bits per audio data. - ~maximum_amplitude (Int, default: 10000)

    Maximum range of amplitude to plot. - ~window_size (Double, default: 10.0)

    Window size of sound input to plot. - ~rate (Double, default: 10.0)

    Publish rate [Hz] of audio amplitude image topic.

spectrum_plot.py

A script to publish frequency vs amplitude plot image.

  • Publishing topics

    • ~output/viz (sensor_msgs/Image)

    Frequency vs amplitude plot image.

  • Subscribing topics

    • ~spectrum (jsk_recognition_msgs/Spectrum)

    Spectrum data calculated from audio by FFT.

CHANGELOG

Changelog for package audio_to_spectrogram

1.2.15 (2020-10-10)

1.2.14 (2020-10-09)

1.2.13 (2020-10-08)

1.2.12 (2020-10-03)

1.2.11 (2020-10-01)

  • Fix for noetic / 20.04 (#2507)
  • [audio_to_spectrogram] Enable multi channel input by retrieving single channel data (#2514)
  • [audio_to_spectrogram] Add README for usage and scripts interface (#2498)
    • [audio_to_spectrogram] Add README for usage and scripts interface
    • [audio_to_spectrogram] add args to audio_to_spectrogram.launch
    • [audio_to_spectrogram] Add arg to run audio_capture
  • Convert audio data to spectrogram (#2478)
    • Make audio_to_spectrogram as ROS package
  • Contributors: Kei Okada, Naoya Yamaguchi, Shingo Kitagawa

1.2.10 (2019-03-27)

1.2.9 (2019-02-23)

1.2.8 (2019-02-22)

1.2.7 (2019-02-14)

1.2.6 (2018-11-02)

1.2.5 (2018-04-09)

1.2.4 (2018-01-12)

1.2.3 (2017-11-23)

1.2.2 (2017-07-23)

1.2.1 (2017-07-15 20:44)

1.2.0 (2017-07-15 09:14)

1.1.3 (2017-07-07)

1.1.2 (2017-06-16)

1.1.1 (2017-03-04)

1.1.0 (2017-02-09 22:50)

1.0.4 (2017-02-09 22:48)

1.0.3 (2017-02-08)

1.0.2 (2017-01-12)

1.0.1 (2016-12-13)

1.0.0 (2016-12-12)

0.3.29 (2016-10-30)

0.3.28 (2016-10-29 16:34)

0.3.27 (2016-10-29 00:14)

0.3.26 (2016-10-27)

0.3.25 (2016-09-16)

0.3.24 (2016-09-15)

0.3.23 (2016-09-14)

0.3.22 (2016-09-13)

0.3.21 (2016-04-15)

0.3.20 (2016-04-14)

0.3.19 (2016-03-22)

0.3.18 (2016-03-21)

0.3.17 (2016-03-20)

0.3.16 (2016-02-11)

0.3.15 (2016-02-09)

0.3.14 (2016-02-04)

0.3.13 (2015-12-19 17:35)

0.3.12 (2015-12-19 14:44)

0.3.11 (2015-12-18)

0.3.10 (2015-12-17)

0.3.9 (2015-12-14)

0.3.8 (2015-12-08)

0.3.7 (2015-11-19)

0.3.6 (2015-09-11)

0.3.5 (2015-09-09)

0.3.4 (2015-09-07)

0.3.3 (2015-09-06)

0.3.2 (2015-09-05)

0.3.1 (2015-09-04 17:12)

0.3.0 (2015-09-04 12:37)

0.2.18 (2015-09-04 01:07)

0.2.17 (2015-08-21)

0.2.16 (2015-08-19)

0.2.15 (2015-08-18)

0.2.14 (2015-08-13)

0.2.13 (2015-06-11)

0.2.12 (2015-05-04)

0.2.11 (2015-04-13)

0.2.10 (2015-04-09)

0.2.9 (2015-03-29)

0.2.7 (2015-03-26)

0.2.6 (2015-03-25)

0.2.5 (2015-03-17)

0.2.4 (2015-03-08)

0.2.3 (2015-02-02)

0.2.2 (2015-01-30)

0.2.0 (2015-01-29 12:20)

0.1.34 (2015-01-29 11:53)

0.1.33 (2015-01-24)

0.1.32 (2015-01-12)

0.1.31 (2015-01-08)

0.1.30 (2014-12-24 16:45)

0.1.29 (2014-12-24 12:43)

0.1.28 (2014-12-17)

0.1.27 (2014-12-09)

0.1.26 (2014-11-23)

0.1.25 (2014-11-21)

0.1.24 (2014-11-15)

0.1.23 (2014-10-09)

0.1.22 (2014-09-24)

0.1.21 (2014-09-20)

0.1.20 (2014-09-17)

0.1.19 (2014-09-15)

0.1.18 (2014-09-13)

0.1.17 (2014-09-07)

0.1.16 (2014-09-04)

0.1.15 (2014-08-26)

0.1.14 (2014-08-01)

0.1.13 (2014-07-29)

0.1.12 (2014-07-24)

0.1.11 (2014-07-08)

0.1.10 (2014-07-07)

0.1.9 (2014-07-01)

0.1.8 (2014-06-29)

0.1.7 (2014-05-31)

0.1.6 (2014-05-30)

0.1.5 (2014-05-29)

0.1.4 (2014-04-25)

0.1.3 (2014-04-12)

0.1.2 (2014-04-11)

0.1.1 (2014-04-10)

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Launch files

  • sample/sample_audio_to_spectrogram.launch
    • data flow
      • gui [default: true]
      • filename [default: $(find audio_to_spectrogram)/sample/data/audio_300hz.bag]
  • launch/audio_to_spectrogram.launch
    • data flow
      • launch_audio_capture [default: true]
      • bitdepth [default: 16]
      • mic_sampling_rate [default: 16000]
      • n_channel [default: 1]
      • device [default: hw:0,0]
      • audio_topic [default: /audio]
      • high_cut_freq [default: 800]
      • low_cut_freq [default: 1]
      • spectrogram_period [default: 5]
      • gui [default: true]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged audio_to_spectrogram at answers.ros.org

Package Summary

Tags No category tags.
Version 1.2.15
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/jsk-ros-pkg/jsk_recognition.git
VCS Type git
VCS Version master
Last Updated 2022-12-14
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Convert audio (audio_common_msgs/AudioData) to spectrogram (sensor_msgs/Image)

Additional Links

No additional links.

Maintainers

  • Naoya Yamaguchi

Authors

No additional authors.

audio_to_spectrogram

This package converts audio data to spectrum and spectrogram data.

Usage

By following command, you can publish audio, spectrum and spectrogram topics. Please set correct args for your microphone configuration, such as mic_sampling_rate or bitdepth.

roslaunch audio_to_spectrogram audio_to_spectrogram.launch

Here is an example using rosbag with 300Hz audio.

roslaunch audio_to_spectrogram sample_audio_to_spectrogram.launch

Audio Amplitude Spectrum Spectrogram

Scripts

audio_to_spectrum.py

A script to convert audio to spectrum.

  • Publishing topics

    • ~spectrum (jsk_recognition_msgs/Spectrum)

    Spectrum data calculated from audio by FFT.

  • Subscribing topics

    • audio (audio_common_msgs/AudioData)

    Audio stream data from microphone. The audio format must be wave.

  • Parameters

    • ~mic_sampling_rate (Int, default: 16000)

    Sampling rate [Hz] of microphone. Namely, sampling rate of audio topic. - ~fft_sampling_period (Double, default: 0.3)

    Period [s] to sample audio data for one FFT. - ~n_channel (Int, default: 1)

    Number of channel of microphone. - ~target_channel (Int, default: 0)

    Target channel. - ~bitdepth (Int, default: 16)

    Number of bits per audio data. - ~high_cut_freq (Int, default: 800)

    Threshold to limit the maximum frequency of the output spectrum. - ~low_cut_freq (Int, default: 1)

    Threshold to limit the minimum frequency of the output spectrum.

spectrum_to_spectrogram.py

A script to convert spectrum to spectrogram.

  • Publishing topics

    • ~spectrogram (sensor_msgs/Image)

    Spectrogram data, which is concatenation of spectrum in time series. Image format is 32FC1.

  • Subscribing topics

    • ~spectrum (jsk_recognition_msgs/Spectrum)

    Spectrum data calculated from audio by FFT.

  • Parameters

    • ~image_height (Int, default: 300)

    Number of vertical (frequency axis) pixels in output spectrogram. - ~image_width (Int, default: 300)

    Number of horizontal (time axis) pixels in output spectrogram. - ~spectrogram_period (Double, default: 5)

    Period [s] to store spectrum data to create one spectrogram topic. - ~publish_rate (Double, default: image_width / spectrogram_period)

    Publish rate [Hz] of spectrogram topic.

audio_amplitude_plot.py

A script to publish audio amplitude plot image.

  • Publishing topics

    • ~output/viz (sensor_msgs/Image)

    Audio amplitude plot image.

  • Subscribing topics

    • ~audio (audio_common_msgs/AudioData)

    Audio stream data from microphone. The audio format must be wave.

  • Parameters

    • ~mic_sampling_rate (Int, default: 16000)

    Sampling rate [Hz] of microphone. Namely, sampling rate of audio topic. - ~n_channel (Int, default: 1)

    Number of channel of microphone. - ~target_channel (Int, default: 0)

    Target channel. - ~bitdepth (Int, default: 16)

    Number of bits per audio data. - ~maximum_amplitude (Int, default: 10000)

    Maximum range of amplitude to plot. - ~window_size (Double, default: 10.0)

    Window size of sound input to plot. - ~rate (Double, default: 10.0)

    Publish rate [Hz] of audio amplitude image topic.

spectrum_plot.py

A script to publish frequency vs amplitude plot image.

  • Publishing topics

    • ~output/viz (sensor_msgs/Image)

    Frequency vs amplitude plot image.

  • Subscribing topics

    • ~spectrum (jsk_recognition_msgs/Spectrum)

    Spectrum data calculated from audio by FFT.

CHANGELOG

Changelog for package audio_to_spectrogram

1.2.15 (2020-10-10)

1.2.14 (2020-10-09)

1.2.13 (2020-10-08)

1.2.12 (2020-10-03)

1.2.11 (2020-10-01)

  • Fix for noetic / 20.04 (#2507)
  • [audio_to_spectrogram] Enable multi channel input by retrieving single channel data (#2514)
  • [audio_to_spectrogram] Add README for usage and scripts interface (#2498)
    • [audio_to_spectrogram] Add README for usage and scripts interface
    • [audio_to_spectrogram] add args to audio_to_spectrogram.launch
    • [audio_to_spectrogram] Add arg to run audio_capture
  • Convert audio data to spectrogram (#2478)
    • Make audio_to_spectrogram as ROS package
  • Contributors: Kei Okada, Naoya Yamaguchi, Shingo Kitagawa

1.2.10 (2019-03-27)

1.2.9 (2019-02-23)

1.2.8 (2019-02-22)

1.2.7 (2019-02-14)

1.2.6 (2018-11-02)

1.2.5 (2018-04-09)

1.2.4 (2018-01-12)

1.2.3 (2017-11-23)

1.2.2 (2017-07-23)

1.2.1 (2017-07-15 20:44)

1.2.0 (2017-07-15 09:14)

1.1.3 (2017-07-07)

1.1.2 (2017-06-16)

1.1.1 (2017-03-04)

1.1.0 (2017-02-09 22:50)

1.0.4 (2017-02-09 22:48)

1.0.3 (2017-02-08)

1.0.2 (2017-01-12)

1.0.1 (2016-12-13)

1.0.0 (2016-12-12)

0.3.29 (2016-10-30)

0.3.28 (2016-10-29 16:34)

0.3.27 (2016-10-29 00:14)

0.3.26 (2016-10-27)

0.3.25 (2016-09-16)

0.3.24 (2016-09-15)

0.3.23 (2016-09-14)

0.3.22 (2016-09-13)

0.3.21 (2016-04-15)

0.3.20 (2016-04-14)

0.3.19 (2016-03-22)

0.3.18 (2016-03-21)

0.3.17 (2016-03-20)

0.3.16 (2016-02-11)

0.3.15 (2016-02-09)

0.3.14 (2016-02-04)

0.3.13 (2015-12-19 17:35)

0.3.12 (2015-12-19 14:44)

0.3.11 (2015-12-18)

0.3.10 (2015-12-17)

0.3.9 (2015-12-14)

0.3.8 (2015-12-08)

0.3.7 (2015-11-19)

0.3.6 (2015-09-11)

0.3.5 (2015-09-09)

0.3.4 (2015-09-07)

0.3.3 (2015-09-06)

0.3.2 (2015-09-05)

0.3.1 (2015-09-04 17:12)

0.3.0 (2015-09-04 12:37)

0.2.18 (2015-09-04 01:07)

0.2.17 (2015-08-21)

0.2.16 (2015-08-19)

0.2.15 (2015-08-18)

0.2.14 (2015-08-13)

0.2.13 (2015-06-11)

0.2.12 (2015-05-04)

0.2.11 (2015-04-13)

0.2.10 (2015-04-09)

0.2.9 (2015-03-29)

0.2.7 (2015-03-26)

0.2.6 (2015-03-25)

0.2.5 (2015-03-17)

0.2.4 (2015-03-08)

0.2.3 (2015-02-02)

0.2.2 (2015-01-30)

0.2.0 (2015-01-29 12:20)

0.1.34 (2015-01-29 11:53)

0.1.33 (2015-01-24)

0.1.32 (2015-01-12)

0.1.31 (2015-01-08)

0.1.30 (2014-12-24 16:45)

0.1.29 (2014-12-24 12:43)

0.1.28 (2014-12-17)

0.1.27 (2014-12-09)

0.1.26 (2014-11-23)

0.1.25 (2014-11-21)

0.1.24 (2014-11-15)

0.1.23 (2014-10-09)

0.1.22 (2014-09-24)

0.1.21 (2014-09-20)

0.1.20 (2014-09-17)

0.1.19 (2014-09-15)

0.1.18 (2014-09-13)

0.1.17 (2014-09-07)

0.1.16 (2014-09-04)

0.1.15 (2014-08-26)

0.1.14 (2014-08-01)

0.1.13 (2014-07-29)

0.1.12 (2014-07-24)

0.1.11 (2014-07-08)

0.1.10 (2014-07-07)

0.1.9 (2014-07-01)

0.1.8 (2014-06-29)

0.1.7 (2014-05-31)

0.1.6 (2014-05-30)

0.1.5 (2014-05-29)

0.1.4 (2014-04-25)

0.1.3 (2014-04-12)

0.1.2 (2014-04-11)

0.1.1 (2014-04-10)

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Launch files

  • sample/sample_audio_to_spectrogram.launch
    • data flow
      • gui [default: true]
      • filename [default: $(find audio_to_spectrogram)/sample/data/audio_300hz.bag]
  • launch/audio_to_spectrogram.launch
    • data flow
      • launch_audio_capture [default: true]
      • bitdepth [default: 16]
      • mic_sampling_rate [default: 16000]
      • n_channel [default: 1]
      • device [default: hw:0,0]
      • audio_topic [default: /audio]
      • high_cut_freq [default: 800]
      • low_cut_freq [default: 1]
      • spectrogram_period [default: 5]
      • gui [default: true]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged audio_to_spectrogram at answers.ros.org

Package Summary

Tags No category tags.
Version 1.2.15
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/jsk-ros-pkg/jsk_recognition.git
VCS Type git
VCS Version master
Last Updated 2022-12-14
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Convert audio (audio_common_msgs/AudioData) to spectrogram (sensor_msgs/Image)

Additional Links

No additional links.

Maintainers

  • Naoya Yamaguchi

Authors

No additional authors.

audio_to_spectrogram

This package converts audio data to spectrum and spectrogram data.

Usage

By following command, you can publish audio, spectrum and spectrogram topics. Please set correct args for your microphone configuration, such as mic_sampling_rate or bitdepth.

roslaunch audio_to_spectrogram audio_to_spectrogram.launch

Here is an example using rosbag with 300Hz audio.

roslaunch audio_to_spectrogram sample_audio_to_spectrogram.launch

Audio Amplitude Spectrum Spectrogram

Scripts

audio_to_spectrum.py

A script to convert audio to spectrum.

  • Publishing topics

    • ~spectrum (jsk_recognition_msgs/Spectrum)

    Spectrum data calculated from audio by FFT.

  • Subscribing topics

    • audio (audio_common_msgs/AudioData)

    Audio stream data from microphone. The audio format must be wave.

  • Parameters

    • ~mic_sampling_rate (Int, default: 16000)

    Sampling rate [Hz] of microphone. Namely, sampling rate of audio topic. - ~fft_sampling_period (Double, default: 0.3)

    Period [s] to sample audio data for one FFT. - ~n_channel (Int, default: 1)

    Number of channel of microphone. - ~target_channel (Int, default: 0)

    Target channel. - ~bitdepth (Int, default: 16)

    Number of bits per audio data. - ~high_cut_freq (Int, default: 800)

    Threshold to limit the maximum frequency of the output spectrum. - ~low_cut_freq (Int, default: 1)

    Threshold to limit the minimum frequency of the output spectrum.

spectrum_to_spectrogram.py

A script to convert spectrum to spectrogram.

  • Publishing topics

    • ~spectrogram (sensor_msgs/Image)

    Spectrogram data, which is concatenation of spectrum in time series. Image format is 32FC1.

  • Subscribing topics

    • ~spectrum (jsk_recognition_msgs/Spectrum)

    Spectrum data calculated from audio by FFT.

  • Parameters

    • ~image_height (Int, default: 300)

    Number of vertical (frequency axis) pixels in output spectrogram. - ~image_width (Int, default: 300)

    Number of horizontal (time axis) pixels in output spectrogram. - ~spectrogram_period (Double, default: 5)

    Period [s] to store spectrum data to create one spectrogram topic. - ~publish_rate (Double, default: image_width / spectrogram_period)

    Publish rate [Hz] of spectrogram topic.

audio_amplitude_plot.py

A script to publish audio amplitude plot image.

  • Publishing topics

    • ~output/viz (sensor_msgs/Image)

    Audio amplitude plot image.

  • Subscribing topics

    • ~audio (audio_common_msgs/AudioData)

    Audio stream data from microphone. The audio format must be wave.

  • Parameters

    • ~mic_sampling_rate (Int, default: 16000)

    Sampling rate [Hz] of microphone. Namely, sampling rate of audio topic. - ~n_channel (Int, default: 1)

    Number of channel of microphone. - ~target_channel (Int, default: 0)

    Target channel. - ~bitdepth (Int, default: 16)

    Number of bits per audio data. - ~maximum_amplitude (Int, default: 10000)

    Maximum range of amplitude to plot. - ~window_size (Double, default: 10.0)

    Window size of sound input to plot. - ~rate (Double, default: 10.0)

    Publish rate [Hz] of audio amplitude image topic.

spectrum_plot.py

A script to publish frequency vs amplitude plot image.

  • Publishing topics

    • ~output/viz (sensor_msgs/Image)

    Frequency vs amplitude plot image.

  • Subscribing topics

    • ~spectrum (jsk_recognition_msgs/Spectrum)

    Spectrum data calculated from audio by FFT.

CHANGELOG

Changelog for package audio_to_spectrogram

1.2.15 (2020-10-10)

1.2.14 (2020-10-09)

1.2.13 (2020-10-08)

1.2.12 (2020-10-03)

1.2.11 (2020-10-01)

  • Fix for noetic / 20.04 (#2507)
  • [audio_to_spectrogram] Enable multi channel input by retrieving single channel data (#2514)
  • [audio_to_spectrogram] Add README for usage and scripts interface (#2498)
    • [audio_to_spectrogram] Add README for usage and scripts interface
    • [audio_to_spectrogram] add args to audio_to_spectrogram.launch
    • [audio_to_spectrogram] Add arg to run audio_capture
  • Convert audio data to spectrogram (#2478)
    • Make audio_to_spectrogram as ROS package
  • Contributors: Kei Okada, Naoya Yamaguchi, Shingo Kitagawa

1.2.10 (2019-03-27)

1.2.9 (2019-02-23)

1.2.8 (2019-02-22)

1.2.7 (2019-02-14)

1.2.6 (2018-11-02)

1.2.5 (2018-04-09)

1.2.4 (2018-01-12)

1.2.3 (2017-11-23)

1.2.2 (2017-07-23)

1.2.1 (2017-07-15 20:44)

1.2.0 (2017-07-15 09:14)

1.1.3 (2017-07-07)

1.1.2 (2017-06-16)

1.1.1 (2017-03-04)

1.1.0 (2017-02-09 22:50)

1.0.4 (2017-02-09 22:48)

1.0.3 (2017-02-08)

1.0.2 (2017-01-12)

1.0.1 (2016-12-13)

1.0.0 (2016-12-12)

0.3.29 (2016-10-30)

0.3.28 (2016-10-29 16:34)

0.3.27 (2016-10-29 00:14)

0.3.26 (2016-10-27)

0.3.25 (2016-09-16)

0.3.24 (2016-09-15)

0.3.23 (2016-09-14)

0.3.22 (2016-09-13)

0.3.21 (2016-04-15)

0.3.20 (2016-04-14)

0.3.19 (2016-03-22)

0.3.18 (2016-03-21)

0.3.17 (2016-03-20)

0.3.16 (2016-02-11)

0.3.15 (2016-02-09)

0.3.14 (2016-02-04)

0.3.13 (2015-12-19 17:35)

0.3.12 (2015-12-19 14:44)

0.3.11 (2015-12-18)

0.3.10 (2015-12-17)

0.3.9 (2015-12-14)

0.3.8 (2015-12-08)

0.3.7 (2015-11-19)

0.3.6 (2015-09-11)

0.3.5 (2015-09-09)

0.3.4 (2015-09-07)

0.3.3 (2015-09-06)

0.3.2 (2015-09-05)

0.3.1 (2015-09-04 17:12)

0.3.0 (2015-09-04 12:37)

0.2.18 (2015-09-04 01:07)

0.2.17 (2015-08-21)

0.2.16 (2015-08-19)

0.2.15 (2015-08-18)

0.2.14 (2015-08-13)

0.2.13 (2015-06-11)

0.2.12 (2015-05-04)

0.2.11 (2015-04-13)

0.2.10 (2015-04-09)

0.2.9 (2015-03-29)

0.2.7 (2015-03-26)

0.2.6 (2015-03-25)

0.2.5 (2015-03-17)

0.2.4 (2015-03-08)

0.2.3 (2015-02-02)

0.2.2 (2015-01-30)

0.2.0 (2015-01-29 12:20)

0.1.34 (2015-01-29 11:53)

0.1.33 (2015-01-24)

0.1.32 (2015-01-12)

0.1.31 (2015-01-08)

0.1.30 (2014-12-24 16:45)

0.1.29 (2014-12-24 12:43)

0.1.28 (2014-12-17)

0.1.27 (2014-12-09)

0.1.26 (2014-11-23)

0.1.25 (2014-11-21)

0.1.24 (2014-11-15)

0.1.23 (2014-10-09)

0.1.22 (2014-09-24)

0.1.21 (2014-09-20)

0.1.20 (2014-09-17)

0.1.19 (2014-09-15)

0.1.18 (2014-09-13)

0.1.17 (2014-09-07)

0.1.16 (2014-09-04)

0.1.15 (2014-08-26)

0.1.14 (2014-08-01)

0.1.13 (2014-07-29)

0.1.12 (2014-07-24)

0.1.11 (2014-07-08)

0.1.10 (2014-07-07)

0.1.9 (2014-07-01)

0.1.8 (2014-06-29)

0.1.7 (2014-05-31)

0.1.6 (2014-05-30)

0.1.5 (2014-05-29)

0.1.4 (2014-04-25)

0.1.3 (2014-04-12)

0.1.2 (2014-04-11)

0.1.1 (2014-04-10)

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Launch files

  • sample/sample_audio_to_spectrogram.launch
    • data flow
      • gui [default: true]
      • filename [default: $(find audio_to_spectrogram)/sample/data/audio_300hz.bag]
  • launch/audio_to_spectrogram.launch
    • data flow
      • launch_audio_capture [default: true]
      • bitdepth [default: 16]
      • mic_sampling_rate [default: 16000]
      • n_channel [default: 1]
      • device [default: hw:0,0]
      • audio_topic [default: /audio]
      • high_cut_freq [default: 800]
      • low_cut_freq [default: 1]
      • spectrogram_period [default: 5]
      • gui [default: true]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged audio_to_spectrogram at answers.ros.org

Package Summary

Tags No category tags.
Version 1.2.15
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/jsk-ros-pkg/jsk_recognition.git
VCS Type git
VCS Version master
Last Updated 2022-12-14
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Convert audio (audio_common_msgs/AudioData) to spectrogram (sensor_msgs/Image)

Additional Links

No additional links.

Maintainers

  • Naoya Yamaguchi

Authors

No additional authors.

audio_to_spectrogram

This package converts audio data to spectrum and spectrogram data.

Usage

By following command, you can publish audio, spectrum and spectrogram topics. Please set correct args for your microphone configuration, such as mic_sampling_rate or bitdepth.

roslaunch audio_to_spectrogram audio_to_spectrogram.launch

Here is an example using rosbag with 300Hz audio.

roslaunch audio_to_spectrogram sample_audio_to_spectrogram.launch

Audio Amplitude Spectrum Spectrogram

Scripts

audio_to_spectrum.py

A script to convert audio to spectrum.

  • Publishing topics

    • ~spectrum (jsk_recognition_msgs/Spectrum)

    Spectrum data calculated from audio by FFT.

  • Subscribing topics

    • audio (audio_common_msgs/AudioData)

    Audio stream data from microphone. The audio format must be wave.

  • Parameters

    • ~mic_sampling_rate (Int, default: 16000)

    Sampling rate [Hz] of microphone. Namely, sampling rate of audio topic. - ~fft_sampling_period (Double, default: 0.3)

    Period [s] to sample audio data for one FFT. - ~n_channel (Int, default: 1)

    Number of channel of microphone. - ~target_channel (Int, default: 0)

    Target channel. - ~bitdepth (Int, default: 16)

    Number of bits per audio data. - ~high_cut_freq (Int, default: 800)

    Threshold to limit the maximum frequency of the output spectrum. - ~low_cut_freq (Int, default: 1)

    Threshold to limit the minimum frequency of the output spectrum.

spectrum_to_spectrogram.py

A script to convert spectrum to spectrogram.

  • Publishing topics

    • ~spectrogram (sensor_msgs/Image)

    Spectrogram data, which is concatenation of spectrum in time series. Image format is 32FC1.

  • Subscribing topics

    • ~spectrum (jsk_recognition_msgs/Spectrum)

    Spectrum data calculated from audio by FFT.

  • Parameters

    • ~image_height (Int, default: 300)

    Number of vertical (frequency axis) pixels in output spectrogram. - ~image_width (Int, default: 300)

    Number of horizontal (time axis) pixels in output spectrogram. - ~spectrogram_period (Double, default: 5)

    Period [s] to store spectrum data to create one spectrogram topic. - ~publish_rate (Double, default: image_width / spectrogram_period)

    Publish rate [Hz] of spectrogram topic.

audio_amplitude_plot.py

A script to publish audio amplitude plot image.

  • Publishing topics

    • ~output/viz (sensor_msgs/Image)

    Audio amplitude plot image.

  • Subscribing topics

    • ~audio (audio_common_msgs/AudioData)

    Audio stream data from microphone. The audio format must be wave.

  • Parameters

    • ~mic_sampling_rate (Int, default: 16000)

    Sampling rate [Hz] of microphone. Namely, sampling rate of audio topic. - ~n_channel (Int, default: 1)

    Number of channel of microphone. - ~target_channel (Int, default: 0)

    Target channel. - ~bitdepth (Int, default: 16)

    Number of bits per audio data. - ~maximum_amplitude (Int, default: 10000)

    Maximum range of amplitude to plot. - ~window_size (Double, default: 10.0)

    Window size of sound input to plot. - ~rate (Double, default: 10.0)

    Publish rate [Hz] of audio amplitude image topic.

spectrum_plot.py

A script to publish frequency vs amplitude plot image.

  • Publishing topics

    • ~output/viz (sensor_msgs/Image)

    Frequency vs amplitude plot image.

  • Subscribing topics

    • ~spectrum (jsk_recognition_msgs/Spectrum)

    Spectrum data calculated from audio by FFT.

CHANGELOG

Changelog for package audio_to_spectrogram

1.2.15 (2020-10-10)

1.2.14 (2020-10-09)

1.2.13 (2020-10-08)

1.2.12 (2020-10-03)

1.2.11 (2020-10-01)

  • Fix for noetic / 20.04 (#2507)
  • [audio_to_spectrogram] Enable multi channel input by retrieving single channel data (#2514)
  • [audio_to_spectrogram] Add README for usage and scripts interface (#2498)
    • [audio_to_spectrogram] Add README for usage and scripts interface
    • [audio_to_spectrogram] add args to audio_to_spectrogram.launch
    • [audio_to_spectrogram] Add arg to run audio_capture
  • Convert audio data to spectrogram (#2478)
    • Make audio_to_spectrogram as ROS package
  • Contributors: Kei Okada, Naoya Yamaguchi, Shingo Kitagawa

1.2.10 (2019-03-27)

1.2.9 (2019-02-23)

1.2.8 (2019-02-22)

1.2.7 (2019-02-14)

1.2.6 (2018-11-02)

1.2.5 (2018-04-09)

1.2.4 (2018-01-12)

1.2.3 (2017-11-23)

1.2.2 (2017-07-23)

1.2.1 (2017-07-15 20:44)

1.2.0 (2017-07-15 09:14)

1.1.3 (2017-07-07)

1.1.2 (2017-06-16)

1.1.1 (2017-03-04)

1.1.0 (2017-02-09 22:50)

1.0.4 (2017-02-09 22:48)

1.0.3 (2017-02-08)

1.0.2 (2017-01-12)

1.0.1 (2016-12-13)

1.0.0 (2016-12-12)

0.3.29 (2016-10-30)

0.3.28 (2016-10-29 16:34)

0.3.27 (2016-10-29 00:14)

0.3.26 (2016-10-27)

0.3.25 (2016-09-16)

0.3.24 (2016-09-15)

0.3.23 (2016-09-14)

0.3.22 (2016-09-13)

0.3.21 (2016-04-15)

0.3.20 (2016-04-14)

0.3.19 (2016-03-22)

0.3.18 (2016-03-21)

0.3.17 (2016-03-20)

0.3.16 (2016-02-11)

0.3.15 (2016-02-09)

0.3.14 (2016-02-04)

0.3.13 (2015-12-19 17:35)

0.3.12 (2015-12-19 14:44)

0.3.11 (2015-12-18)

0.3.10 (2015-12-17)

0.3.9 (2015-12-14)

0.3.8 (2015-12-08)

0.3.7 (2015-11-19)

0.3.6 (2015-09-11)

0.3.5 (2015-09-09)

0.3.4 (2015-09-07)

0.3.3 (2015-09-06)

0.3.2 (2015-09-05)

0.3.1 (2015-09-04 17:12)

0.3.0 (2015-09-04 12:37)

0.2.18 (2015-09-04 01:07)

0.2.17 (2015-08-21)

0.2.16 (2015-08-19)

0.2.15 (2015-08-18)

0.2.14 (2015-08-13)

0.2.13 (2015-06-11)

0.2.12 (2015-05-04)

0.2.11 (2015-04-13)

0.2.10 (2015-04-09)

0.2.9 (2015-03-29)

0.2.7 (2015-03-26)

0.2.6 (2015-03-25)

0.2.5 (2015-03-17)

0.2.4 (2015-03-08)

0.2.3 (2015-02-02)

0.2.2 (2015-01-30)

0.2.0 (2015-01-29 12:20)

0.1.34 (2015-01-29 11:53)

0.1.33 (2015-01-24)

0.1.32 (2015-01-12)

0.1.31 (2015-01-08)

0.1.30 (2014-12-24 16:45)

0.1.29 (2014-12-24 12:43)

0.1.28 (2014-12-17)

0.1.27 (2014-12-09)

0.1.26 (2014-11-23)

0.1.25 (2014-11-21)

0.1.24 (2014-11-15)

0.1.23 (2014-10-09)

0.1.22 (2014-09-24)

0.1.21 (2014-09-20)

0.1.20 (2014-09-17)

0.1.19 (2014-09-15)

0.1.18 (2014-09-13)

0.1.17 (2014-09-07)

0.1.16 (2014-09-04)

0.1.15 (2014-08-26)

0.1.14 (2014-08-01)

0.1.13 (2014-07-29)

0.1.12 (2014-07-24)

0.1.11 (2014-07-08)

0.1.10 (2014-07-07)

0.1.9 (2014-07-01)

0.1.8 (2014-06-29)

0.1.7 (2014-05-31)

0.1.6 (2014-05-30)

0.1.5 (2014-05-29)

0.1.4 (2014-04-25)

0.1.3 (2014-04-12)

0.1.2 (2014-04-11)

0.1.1 (2014-04-10)

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Launch files

  • sample/sample_audio_to_spectrogram.launch
    • data flow
      • gui [default: true]
      • filename [default: $(find audio_to_spectrogram)/sample/data/audio_300hz.bag]
  • launch/audio_to_spectrogram.launch
    • data flow
      • launch_audio_capture [default: true]
      • bitdepth [default: 16]
      • mic_sampling_rate [default: 16000]
      • n_channel [default: 1]
      • device [default: hw:0,0]
      • audio_topic [default: /audio]
      • high_cut_freq [default: 800]
      • low_cut_freq [default: 1]
      • spectrogram_period [default: 5]
      • gui [default: true]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged audio_to_spectrogram at answers.ros.org