フォーラムへの返信
-
投稿者投稿
-
匿名
参加者2) A question concerning several parameters.
– The LENGTH and WINDOW_LENGTH parameters are in many modules. Do they have to be the same everywhere?
– In my case MSG_BUFFER_NUM and DATA_BUFFER_NUM in StreamFromHarkMsgs are equal in size of the buffer sent in the HarkWave message, is this correct? Or do I need to specify the queue size which is set when writing messages to the topic?
3) The HarkWave message contains count. It is equal to seq from header. Am I doing the right thing?
4) HarkWaveVal from HarkWave implies vector <float>. When saving data directly to a file, we get clear sound. After writing a message to HarkWave topic, we catch it by StreamFromHarkMsgs node and write to the file. In this case strong noises appear in the file. Do I need some kind of additional changes in order to transmit through the topic, or do I need to write to the topic just a set of bytes?
5) When recording in ROS-topic, we set the size of the stored queue. Do I need to Indicate it in some of the nodes in hark_designer?
匿名
参加者お力添えできず、大変申し訳ございません。
画像の情報だけでは、原因を特定できません。よろしければ、ご使用の環境一式を添付いただけると
こちらでの再現と調査が可能でございますが、いかがでしょうか。最低限必要なファイル
・ネットワークファイル
・音源ファイル
(もし独自の伝達関数を作成しているようならそちらも)その他、OS・使用したマイクロホンや音源ファイルの情報もあれば調査に役立ちます。
以上、よろしくお願いいたします。
匿名
参加者何度も申し訳ないのですがこれで実行したところグラフのウィドウが出ずに写真のようなのが出ました
どこか間違っているのでしょうか?匿名
参加者丁寧にご返事いただきありがとうございます。
> hark-base
> harkmw
> libharkio3
> libhark-netapi
> hark-core
> harktool5
に関しては、ソースコードからビルドしました。ネットワークファイル実行時にxavier本体がかなり熱くなっていたので、
xavierのファンを常時回すように設定してからネットワークファイルを実行したところ
正常に動作するようになりました。ありがとうございました。
匿名
参加者Thank you, I successfully created a TF with wios.
Paul
匿名
参加者クックブックの記述が分かりにくい点、申し訳ございません。
お問い合わせの件、ご説明いたします。・batchflowについて
batchflowは、HARK-Designerで作成したネットワークファイル(解凍したディレクトリにある拡張子が.nのファイル)を実行するコマンドになります。
HARK-Designer上でExecuteボタンをクリックしたことと同義です。HARKをインストールしたWindows環境であれば、Anaconda Promptを起動して
batchflowと入力してEnterを押してみてください。
添付画像のように表示されるはずです。したがって、クックブックの説明は、
sep_rec_offline.nと2SPK-jp.wavのあるディレクトリでbatchflowコマンドを実行するという意味になります。
これは、ネットワークファイルsep_rec_offline.nを引数2SPK-jp.wavで実行するということになります。また、batchflowはHARK 2.5以前で使用していたコマンドです。HARK 3.0以降は
harkmwというコマンドになりますが、同じ動作をします。・LocalizeMUSICのA_MATRIXについて
こちらに設定するのは定位用伝達関数ファイルのパスになります。
詳細については、以下のリンクをご参照ください。
その際、harktool4と記載していますが、現在のharktoolはバージョンが5になっていますので、
harktool5のドキュメントをご参照願います。LocalizeMUSICノードの説明:
https://www.hark.jp/document/3.0.0/hark-document-ja/subsec-LocalizeMUSIC.htmlHARKTOOL5の説明:
https://www.hark.jp/document/packages/harktool5-gui-ja/index.html・マイクロホンの設定について
クックブックの2.1 はじめての録音 に記載の内容はお試しいただけているでしょうか?
マイクロホンを正しく認識できていませんと、その後の処理が正常に働きませんので
お手数ですが、ご使用のデバイスが正常に動作することを確認いただければと思います。
(ご確認ずみであれば失礼いたしました。)最後に、HARKはUbuntu版を優先して開発していることもあり、ドキュメントやFORUMの投稿内容もUbuntu版の方が充実しております。
お手間でなければ、Ubuntu版の使用もご検討いただけますと幸いです。以上、よろしくお願いいたします。
匿名
参加者マイクロホンからのリアルタイム音源定位が出来ないので音声ファイルでの音源定位をしようとしたのですがエラーが出てしまいます
クックブックを見てもわからずHARK音声認識ファイルセットをダウンロードしたのですが回答したファイルの中にbatchflowがなくわからない状態です
LocalizeMUSICのA_MATRIXに録音したwavファイル名を入れればよいのでしょうか?匿名
参加者If the new question is related to this post, please post in the same thread. Conversely, if the new question is not relevant, please post in a new thread with the appropriate subject. It will probably help people with the same problem to find a solution.
I and we (HARK support team) hope this forum will help you.
Best regards,
匿名
参加者Thank you for your inquiry.
Please check the following points.
Case.1:
Separate human voices with HARK. In other words, if the sampling rate is sufficient at 16kHz, then:1. Although the TSP response file is recorded at 48 kHz, please downsample this file to 16 kHz. Because
16384.little_endian.wavis a TSP file for the 0 to 8 kHz.
2. HARKTOOL creates a transfer function from the TSP response file for the 0 to 8 kHz. In other words, it is not necessary to change the paramter settings for the number of samples by HARKTOOL.
3. In the HARK network file, connect the MultiDownSampler node after the AudioStreamFromMic node, and downsample from 48kHz to 16kHz. And, the LocalizeMUSIC and GHDSS nodes use a transfer function for the 0 to 8 kHz.Normally, 16 kHz is sufficient to process the human voice band.
Case.2:
If you need to separate up to very high frequency bands like electronic sounds. In that case, do not use 16384.little_endian.wav. You need to recreate the TSP file itself for 48kHz. In other words, it is a TSP file up to 24kHz, which is the Nyquist frequency.In this case, the 786,432 samples that you wrote in the post are correct as calculations.
If you can read Matlab script, my script may be helpful. In my code, TSP file and inverse TSP file are generated by specifying sampling rate etc. The reason for duplicating the channel of TSP file is to ensure that wios does not fail if the playback device is stereo.
I think my script maybe works with Matlab’s Clone (eg octave) too, but I will attach a 48kHz sample just in case.
Best regards,
匿名
参加者Thank you so much!
If other questions arise, may I ask them here?匿名
参加者I’m sorry, I noticed that there was an error in the command I posted before.
I apologize for the confusion caused by the wrong information.Please try the following command:
In this example, plughw:1,0 is a recording device and plughw:0,0 is a playback device.wios -s -y 0 -d plughw:0,0 -z 0 -a plughw:1,0 -c 8 -i input.wav -o output.wavThe meaning of
-y 0is that the playback device is an ALSA device.
The meaning of-d plughw:0,0is that the playback device isplughw:0,0.
The meaning of-z 0is that the recording device is an ALSA device.
The meaning of-a plughw:1,0is that the recording device isplughw:1,0.
-yoption and-zoption are used instead of-xoption.
Because the recording and playback devices are different (there are two), you need-yand-z. If you can record and play back on one device, eg RASP, use only-x.Best regards,
匿名
参加者お問い合わせありがとうございます。
> hark-base
> harkmw
> libharkio3
> libhark-netapi
> hark-core
> harktool5現在、公式がサポートしているアーキテクチャはIntel系のx86_64のみ(*1)ですので
上記は全てソースコードからビルドされているという認識で宜しいでしょうか?
*1) FAQ: What are the supported architectures by HARK?ARM系プロセッサでは
CFLAGSやCXXFLAGS等で指定する最適化オプションで
性能が大きく変わる事が御座います。未設定の場合はご検討ください。以降、CPUに合わせたコンパイラオプションが適切に設定されているという前提で
書かせて頂きます。.bashrc等で下記の環境変数を追記してから試して頂けますでしょうか。
.bashrcに書いた場合、端末(bash)を立ち上げなおすと反映されます。
HARK-Designer上から実行する場合は、hark_designerコマンドを起動する
端末を立ち上げなおしてHARK-Designer自体も再度起動してください。export OPENBLAS_NUM_THREADS=1もし、他にもOpenBLASを使用しているアプリケーションがあり
環境変数の設定を全体(全てのbash)に反映したくないというケースでは
HARKを実行する際に、下記のように実行する事でコマンドのみに反映されます。
この方法の場合、HARK-Designer上から実行すると反映されません。
必ずコマンドラインからHARKを実行して頂く必要が御座います。OPENBLAS_NUM_THREADS=1 harkmw ./<your_network_file>.nHARK3.0より、実行コマンドの名称が
harkmwに変更されましたが
harkmwの部分は従来通りbatchflowと書いても実行できます。
互換性の為にエイリアスとして設定されているので機能は同じです。以上、宜しくお願い致します。
匿名
参加者First of all, I will talk from factors other than parameters.
Case.1:
If the overall system speed is slowing, the following causes may be considered. If you execute thread processing in a small matrix whose element size is less than a few thousand, calculation units are excessively divided, and the overhead reduces the speed of the OPENBLAS library.Therefore if you are using HARK 3.x, try setting the environment variable
OPENBLAS_NUM_THREADS=1.For example, set the following line in the
.bashrcfile:export OPENBLAS_NUM_THREADS=1In this case, variables will be effective from the newly opened terminal.
Or you can do the following when you run the network file:
OPENBLAS_NUM_THREADS=1 harkmw ./your_networkfile.nIn this case, variables apply only to the command.
Case.2:
If only the processing speed of HARK is decreasing, the following causes may be considered. Please check the following contents.- Make sure that the known sound signal input to the HarkMsgsStreamFromRos node is not intermittent. For example, if a robot performs TTS, the sound signal must be transmitted not only during speech but also during silence periods.
- Make sure that the sampling rate of the microphone array input matches the sampling rate of the sound signal input to the HarkMsgsStreamFromRos node. If it is difficult to match, please adjust the input of HarkMsgsStreamFromRos node to the sampling rate of the microphone array by MultiDownSampler node. Note that if you lower the sampling rate on the microphone array by MultiDownSampler node, you need to recreate the transfer function.
Case.3:
If the parameters of SemiBlindICA node seems to be the cause, please check the following contents.- Please check the background noise level contained in the microphone array input. The SemiBlindICA node’s IS_ZERO parameter is used to determine input levels of INPUT that do not need to be processed, since it is not necessary to perform estimation processing during periods where there is no sound signal input (silence period) of REFERENCE. Note that this parameter should be set with power in the frequency domain.
- Please save the output of AudioStreamFromMic node and HarkMsgsStreamFromRos node with SaveWavePCM. If you compare the sound signals recorded in the two WAV files, you should see something like this:
The waveform of the audio signal obtained at the HarkMsgsStreamFromRos node should be recorded at the AudioStreamFromMic node with a slight delay. The larger the delay amount, the larger the value of the TAP parameter, but if it is excessively large, the amount of calculation increases. However, if it is slow enough to misunderstand it as a hangup, I think that it is not the influence by this parameter.
Best regards,
匿名
参加者Im glad I could help. However I experienced a new problem with the debug version when using synchronous mode and an external recorder (plughw:1,0):
wios -s -x 0 -z plughw:1,0 -i input.wav -o output.wav (=>Fail)
If I enter the command above it only shows me the wios help page. As if I typed “wios -h”. It feels like it doesnt even know the option “-z”. Synchronous mode only works when leaving out “-z plughw:1,0” and therefore using the default setting. Although if I explicitly type in “-z plughw:0,0” it again shows me the help page ¯\_(ツ)_/¯
“plughw:1,0” works fine in recording mode:
wios -r -x 0 -t 4 -o output.wav -a plughw:1,0 -c 8 (=>Success)匿名
参加者I think I set some parameters incorrectly. But I can’t figure out which ones when the system is very slow.
-
投稿者投稿

