フォーラムへの返信
-
投稿者投稿
-
匿名
参加者@Masayuki Takigahira: I checked arecord and aplay are working with my device.
Also, I am sure that the default settings of wios are correct as the same recording device works fine using the wios command in another computer I am operating.
Can you let me know what is the error?
匿名
参加者@paul: The upload failed due to a problem with the file permission. Thank you for contacting me.
———-
For those who visited later …This post was corrected on 27th June 2019.
Since an error was found in the attached file, uploading is done again.
Please downloadwios-check2.zip.匿名
参加者@paul do let me know if you manage to get wios working.
匿名
参加者Ok, thank you for the information
匿名
参加者@Masayuki Takigahira: Thank you for your detailed reply and writing an extra tool. I would love to try out the tool because arecord and aplay work just fine and I still dont understand why wios is not working. I dont see any attachments to your post though 🙁
@Rohan: I wrote a very simple bash-script which records an plays almost simultaneously using arecord and aplay (see end of post). Maybe measure the unavoidable latency between both arecord and aplay commands in a practical experiment were you put speaker and microphone right next to each other. With that information you can maybe later edit the tsp responces accordingly. I will put it to a test soon if I cant get wios working.
!/bin/sh
echo “Starting…” 1>&2
arecord -d 2 -D plughw:1,0 -f S32_LE -r 48000 roomname_distance_d$1.wav &
aplay tsp.wav匿名
参加者Thank you for your inquiry.
wios uses ALSA directly.
First, make sure you can record and playback using
arecordoraplay. If you set the number of bits or encoding that the hardware does not support, it may not work properly. In other words, be aware of the default settings that is used by wios.
Secondly, wios implements only some of the features of ALSA, so some devices may not be supported. For example, when recording 24-bit PCM with the--encoding 24option,S24_LEis supported butS24_3LEis not.I created a tool that I attached in this post, which can be used do a quick check. But since it has not been tested thoroughly, there may be some problems remaining. But if it works well, the output result may be helpful.
How to compile:
g++ wios-check.cpp -lasound -o wios-checkHow to use:
./wios-check <device> <type>
<type>is one ofplayback,captureorboth.
defaults:<device>ishw:0,0selected, and<type>isbothselected.
e.g.)./wios-check plughw:0,0 playbackFinally, HARKTOOL5 offers a new way to create transfer functions from TSP recordings that have not been synchronized. The information is written below, so I hope you find it useful.
[HARKTOOL5-GUI documentation] => [Transfer Function Estimation Using Complex Regression Model]
Best regards,
匿名
参加者ご返信ありがとうございます。
指摘していただいた通りにアンインストールとコードの修正を行い、無事に動作確認を行うことができました。
丁寧な解説ありがとうございました。
引き続きHARKを用いて独自のシステム構築を図っていきます。匿名
参加者Yes, I am also facing the same error. I tried but was unsuccessful to figure out the problem.
my command : wios -r -x 0 -d plughw:1,0 -c 6 -f 48000 -t 6 -o test.wav
Please do let me know on this post if you find a solution.
There is an alternative to wios. You can use Audacity software to record the multichannel audio data.
匿名
参加者Yes, this method will solve my problem.
Thank you for your reply 🙂
匿名
参加者ご回答ありがとうございました。
何度も説明して頂き恐縮ですが、整理させて下さい。
ご承知の通り、マイクの入力から分離音が得られるまでの応答速度改善が第一目的です。①(ADVANCE=160、window=50の場合)preroll_length=0でも50でも、frame0に対する定位情報は
同時刻(frame0が入力されてから約540ms後、つまり音声のframe50が入力されているころ)に出力され、その(frame0の)定位情報に基づき、-今のframe50から処理(分離等のノード処理)するのがpreroll_lemgth=0
(すでにframe0は過ぎてしまっているので、frame50から処理開始)
-バッファから過去50frame分遡ったframe0から処理するのはpreroll_length=50である。つまり、あるframeに対する定位情報を取得するのにかかる時間はpreroll_lengthの設定値により変わらないが、preroll_lengthの設定frame分streamは遅延(同じframe番号の音声入力と分離音出力を比較して)する。
preroll_lengthの設定を0にすれば、理論上streamの遅延はほとんど(1frame以下)ないはず(頭は切れるかもしれないが)。
という事でよろしいでしょうか。
(特に音声の終わりを早く検知したいので、頭は多少切れても良いと考えています。)②pause_lengthについては承知しました。色々ためしたところ、pause_lengthを短くすると
細切れになってしまうため、pause_lengthは800~1200に落ち着いています。③実時間処理の件は承知致しました。
④periodの調整に関しては承知しました。
ADVANCEやLENGTHの設定に関する注意事項、ポイント等はございますでしょうか。
(LENGTHは20~40msが良く、ADVANCEは後続フレームとフレーム全体の 1/3 – 1/2 重なる量シフトを指定すると記載されていましたが、デフォルトでは各512、160samplesということで、2/3が重なっている気がします。しかし例えばLENGTH=256にすると、うまく定位しませんでした)⑤FUTUREになっていました。
今回のような用途の場合はPASTが良いのでしょうか。
上記①との関係も含めて教えて頂ければと思います。
FUTURE、PASTでも、あるframeの定位情報はどこのframeを使用するかということでしょうか?
分かりづらくて恐縮ですが、添付に整理しております。考え方はあっておりますでしょうか。
(preroll_lengthとの関係が理解できているか不安です)匿名
参加者お問い合わせありがとうございます。
ネットワークファイルを確認させていただきましたが、
PyCodeExecutor3ノードで設定している端子名が大文字になっておりました。
チュートリアルで例示しているPythonのsamplecodeでは端子名を小文字としておりますので、
そのまま記述していた場合は定義されていない端子にアクセスしようとしてエラーとなります。
以前に回答させていただいたように、Pythonファイルの記述とネットワークファイルのPyCodeExecutor3ノードに追加した端子名は一致させてください。また、
Node::addFactory : The factory (ノード名) already exists. Ignoring the new one.
というメッセージが多発しているようですが、
こちらは以前のバージョンのHARKとパスが競合している場合に発生します。
flowdesigner-0.9.1-harkをアンインストールして頂くことで、改善するかと存じます。
ソースからコンパイルしていた場合は、$ sudo make uninstallでアンインストール可能です。以上、よろしくお願いいたします。
匿名
参加者There are 2 cases in creating transfer function depending on your setup.
Case1: Geometric transfer function
The position and the number of microphones that actually exists must be set in the HARKTOOL’s channel list. Since ReSpeaker Mic Array only has 4 microphones, it will create a 4-channel transfer function.Case2: TSP transfer function.
The number of microphones used must be set in HARKTOOL’s channel list. But since the TSP sound recorded by ReSpeaker Mic Array has 6 channels, the WAV files input to HARKTOOL must exclude 0 and 5 channels beforehand. To do this, for example if you use a tool called ‘sox’, this can be done by executing the following command:sox input.wav output.wav remix 2 3 4 5Note that the channel number starts with 1 in sox, while in HARK it starts with 0.
In HARK, the 6 channels of data coming from AudioStreamFromMic can be filtered by using the ChannelSelector node in configuring the channels needed.
https://www.hark.jp/document/hark-document-en/subsec-ChannelSelector.html
In your case, if you want to use the 2nd, 3rd, 4th, and 5th channels, you can set
<Vector<int> 1 2 3 4>in the ChannelSelector’s SELECTOR parameter.匿名
参加者Thanks for your response Rohan.
Best regards,
Rosette匿名
参加者Yes, the encountered error is solved
匿名
参加者Hello Rohan,
Can we conclude that the error reported is no longer an issue and this was caused by the input file?
Best regards,
Rosette -
投稿者投稿

