フォーラムへの返信
-
投稿者投稿
-
匿名
参加者また、HarkDataStreamSenderノードの使い方については、どのあたりを見ればC++のプログラムと接続するプログラムが載っていますか。結局、説明を読んだのですが、どこを使えばいいのか理解できませんでした。
匿名
参加者Sorry for my late reply.
This solved my problem. I can now analyze the audio WAV file. Thank you very much!
匿名
参加者Hello,
I’m also working on this currently.
I letaudio_capturepublish wave format. I tried to write a converter
fromAudioData (uint8[] wave)toHarkWavefollowing the instructions mentioned in this answer.
Here is what I ended up with:dhw = HarkWave() dhw.header.stamp = rospy.Time.now() dhw.header.frame_id = str(self.count) dhw.count = self.count harkwaveval = HarkWaveVal(wavedata=data_uint8) result = [] result.append(harkwaveval) dhw.src = result dhw.nch = 1 # one channel dhw.length = 320 dhw.data_bytes = 320 * 4 # float(4bytes) times length of dataWhen I run my network (attached below) it’s only receiving one message from ros and afterwards the network stops with the message “Normally finished”.
So my question is: Why does it stop, since there is no error regarding the network and the topic is still actively pushing messages?Thanks in advance.
匿名
参加者返信ありがとうございます。また、自分の目的が波形を求めるのみであります。ConstantLocalizationをのぞいたとき、どこからの出力をSRC_INFOに接続すればいいですか。
匿名
参加者添付のネットワークであれば、
ConstantLocalizationからの出力をSRC_INFOに接続してください。それ以外のノードを使用しており、音源の定位方向が不定の場合は、
LocalizaMUSICで定位させた音源情報などを接続するようにしてください。以上、宜しくお願い致します。
HARKサポートチーム匿名
参加者返信ありがとうございます。
SRC_INFOに元となるSource情報を送るものは、自分が送った画像の中だと、AudioStreamFromMicか、Beamformingになるのでしょうか。匿名
参加者Please see previous answer on how to convert Structure.
For frame proccessing, refer to the
AudioStreamFromWavesource code.
The source code can be obtained with the following command on Ubuntu.
apt source hark-coreBest regards,
HARK Support匿名
参加者Thank you for your inquiry.
The WAV file format supported by the AudioStreamFromWave node is as follows:
– signed 16bit / 24bit PCM
– WAV-Ex header is not supported.
Please see this page for details.
https://www.hark.jp/document/hark-document-en/subsec-AudioStreamFromWave.htmlYour WAV file could not be loaded due to the following:
– IEEE float 32bit PCM
Unfortunately, this format is not supported by the AudioStreamFromWave node.Solution:
To correct a file that AudioStreamFromWave could not read, follow these steps:Step.1: Please open the WAV file in Audacity. This is the same state as immediately after recording.
Step.2: Please trace like “File => Export => Export Audio…” and display the Export Audio dialog.
Step.3: Please select “Other uncompressed files” for the file type.
Step.4: Please select “WAV (Microsoft)” for the “Header:” item. Please do not choose “WAVEX (Microsoft)” here.
Step.5: Please select “Signed 24-bit PCM” for the “Encoding:” item. TAMAGO-03 has 24-bit resolution. Please select “Signed 16-bit PCM” for other 16-bit microphone arrays.
Step.6: Please click “Save” button.Best regards,
HARK support team匿名
参加者お問い合わせありがとうございます。
HarkDataStreamSenderノードの使い方については、下記リファレンスをご参照ください。
https://www.hark.jp/document/hark-document-ja/subsec-HarkDataStreamSender.html別の投稿ですがHarkDataStreamSenderについて解説しておりますので、参考までに。
また、添付画像ではSRC_WAVEしか入力されていませんが、
SRC_INFOに元となるSource情報を入力する必要があります。以上、宜しくお願い致します。
HARKサポートチーム匿名
参加者We confirmed that it returned to the normal state.
Sincerely,
HARK support team匿名
参加者You can check the latest status of AWS from the “Asia Pacific” tab at https://status.aws.amazon.com/ .
匿名
参加者I am using the package
ros-kinetic-audio-captureto stream the audio from the built-in microphone of the robot.With this package it is possible to stream audio data in wave format:
PARAMETERS * /audio_capture/channels: 1 * /audio_capture/depth: 16 * /audio_capture/device: plughw:1,0 * /audio_capture/format: wave * /audio_capture/sample_rate: 16000 * /rosdistro: kinetic * /rosversion: 1.12.14 NODES / audio_capture (audio_capture/audio_capture)The data structure of the data stream
audio_common_msgs/AudioDatais as follows:user@laptop:~$ rosmsg show audio_common_msgs/AudioData uint8[] dataTherefore, it is not compatible with the data structure of
hark_msgs/HarkWave.Is there a practical way to make the data structure of
audio_common_msgs/AudioDatacompatible with Hark?Otherwise, would you suggest another package different than
ros-kinetic-audio-capturein order to have Hark-compatible access to the data from the robot’s built-in microphone?Thanks in advance.
匿名
参加者You need to use
hark_msgs/HarkWavein your workspace.
In your case,audio_common_msgs/AudioDataseems to storemp3data intouint8[]array, so you will first need to expand it to raw PCM data.Second, the data structure of
hark_msgs/HarkWaveis as follows.user@ubuntu:~$ rosmsg show hark_msgs/HarkWave std_msgs/Header header uint32 seq time stamp string frame_id int32 count int32 nch int32 length int32 data_bytes hark_msgs/HarkWaveVal[] src float32[] wavedatawavedatais a raw PCM data array. Since HARK is not aware of the number of bits, it simply casts an integer value to a floating point type. In other words,123is123.0f.data_bytesis the data size. In other words, it is the size offloat(4 bytes) multiplied by the size ofwavedata.lengthis the number of samples per frame handled by HARK. The initial value of HARK is512. Since HARK processed frame by frame, in other words, the size ofwavedatamust benchtimeslength=512.nchis the number of channels. Your device seems to be 1ch, so it should be1. For microphone array data, a larger number will be stored.countis the frame count. Since HARK processing frame by frame, it is necessary to know what frame the data is. In other words, it is incremented as the frame advances. The first frame number is0. Not1.There is a final note. In order to prevent problems in FFT/IFFT processing, etc., the frames processing by HARK are subject to sample overlap processing.
The following image may help you understand.

Best regards,
m.takigahira匿名
参加者Sample code is not provided from the official website, but specifications and source code are available. I hope you find it helpful.
There is only one point to note. Since the data is transmitted in little endian, it is not in the network byte order generally called.Please refer to the next url for specifications.
https://www.hark.jp/document/hark-document-en/subsec-HarkDataStreamSender.htmlThe source code can be obtained with the following command on Ubuntu.
apt source hark-coreIn the case of Windows environment, it is probably easy to download from the following URL.
http://archive.hark.jp/harkrepos/dists/bionic/non-free/source/
You can download any version by clicking the following file name on the browser. The<version>will be in the form of “x.x.x”.
hark-core_<version>.tar.gzBest regards,
m.takigahira匿名
参加者The Windows version of wios supports only the function to record via the network that RASP-24 etc. supports. In other words, wios can be used only when recording over the network with a USB-LAN or USB-Wireless dongle inserted into the USB port of the RASP-ZX.
Currently, when connecting directly with a USB cable, you can only create a WAV file with a third-party recording tool such as Audacity. HARKTOOL5 can create a transfer function with an Complex Regression Model that does not require synchronized recording.
https://www.hark.jp/document/packages/harktool5-gui-en/harktool5-gui.html#fd-conv-label
If you need a TSP wav file created by synchronized recording, the following workaround also exists.
Please create Ubuntu installed the virtual machine on VMWare/VirtualBox on Windows and connect RASP-ZX to the virtual machine. In that case, you can record with ALSA.
Best regards,
m.takigahira——————————————————————————————
Since I noticed that there was a mistake, I deleted it immediately after the following post. wios did not support both WASAPI and DirectSound (DS) at this time. Only the RASP protocol that cannot be supported by the standard Windows API is supported.
The RASP-24 is connected via a LAN, and the recording data is transmitted over the network using the SiF original protocol and recorded using the SiF original interface.The USB Audio Class (UAC) supported devices connected via USB, such as TAMAGO-03, are recorded with WASAPI or DirectSound (DS) interface.RASP-ZX supports two connection methods.
If you are connected directly to a PC with a USB cable, it will be recorded with WASAPI or DS interface. On the other hand, if a USB-LAN or USB-Wireless dongle is inserted into the USB port and you are trying to connect via a network, it will be connected with the SiF original protocol as same as RASP-24.You need to choose a wios command depending on which connection method you use.Notes:
HARK has supported WASAPI since version 3.0, but wios has not yet completed support for WASAPI, DirectSound (DS) will be used. The effect of this difference will hardly occur.Best regards,
m.takigahira -
投稿者投稿

