noise suppression with librespeaker in RespeakerCorev2

Hi Fred,



The capture and playback sample rate of seeed voicecard should be the same in Alsa setup. So we have to configure Alsa(edit /etc/asound.conf file) as follow:

</s>sudo nano /etc/asound.conf<e>

[code]pcm.!default {
type asym
#capture.pcm “hw:Loopback,1,0”
capture.pcm “seeedvoicecard”
#playback.pcm “plughw:seeed8micvoicec,1”
playback.pcm “play”
}

defaults.pcm.rate_converter “samplerate”

pcm.seeedvoicecard {
type plug
slave.pcm “hw:seeed8micvoicec,0”
#slave.rate 48000
#slave.format FLOAT_LE
ttable.0.0 1
ttable.1.1 1
ttable.2.2 1
ttable.3.3 1
ttable.4.4 1
ttable.5.5 1
ttable.6.6 1
ttable.7.7 1
}

pcm.play {
type plug
slave.pcm “hw:seeed8micvoicec,1”
slave.rate 48000
}[/code]

After configuration, you can still play your audio at any sample rate as you want, because Alsa will resample it to 48K automatically.

Hope this helps!



Thanks,

Jerry.

Good catch!

That works great now.

Thank you very much



In the meantime, I also tried to play with the hybrid node but could not compile the line:

hybrid.reset(HybridNode::Create(true,3,1,0,true,0,false));



The compilation returned a load error:

$ g++ arecord_lv.cc -o arecord_lv -lrespeaker -lsndfile -fPIC -std=c++11 -fpermissive -I/usr/include/respeaker/ -DWEBRTC_LINUX -DWEBRTC_POSIX -DWEBRTC_NS_FLOAT -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_INTELLIGIBILITY_ENHANCE

/tmp/ccPFm7fm.o: In function main':<br/> arecord_lv.cc:(.text+0x812): undefined reference to respeaker::HybridNode::Create(bool, int, int, int, bool, int, bool)’

collect2: error: ld returned 1 exit status



Do you know if this function is still in the new version of the library?



Thanks

Fred

Hi Fred,



Yes, there is a bug in this node and thank you to point this out. I have recompiled the librespeaker, please download it again at this link:

<LINK_TEXT text=“https://v2.fangcloud.com/share/11a20219 … f8?lang=en”>https://v2.fangcloud.com/share/11a20219f73655959b42aa57f8?lang=en</LINK_TEXT>



Thanks so much!

Jerry

This one works perfectly well

Thanks you very much

Great service

Fred

Hello,



I have some issues with with the noise reduction example using aloop.

When I record after an “aplay” command, I have a big initial pop in my recording.

For example:

aplay phrase.wav

sox -d -t wavpcm -c 1 -b 16 -r 16000 -e signed-integer --endian little record.wav trim 0 1

Then in my file record.wav, there is a big pop at the beginning that you can hear with aplay.



If I record twice in a row, then the second file is good, meaning:

aplay phrase.wav

sox -d -t wavpcm -c 1 -b 16 -r 16000 -e signed-integer --endian little record.wav trim 0 1

sox -d -t wavpcm -c 1 -b 16 -r 16000 -e signed-integer --endian little record2.wav trim 0 1

The file record.was has the pop but the file record2.wav is good (no initial pop in it).



I hope that you can reproduce and let me know how to fix this because it is causing problem when submitted next to the ASR.



Moreover, I noticed big variation in the volume of my recording. It varies from one recording to another but sometimes within the recording itself (e.g. starting loud and finishing low). I played with the agc parameter and even disable it but without any luck.



Thanks for your help

Hi Fred,



Can you try to record at first and aplay after it? And the format of pharse.wav should be same as the recordings, which means it should be 16-bit. If pharse.wav is not 16-bit, I think you should use an Alsa plugin to play it.

Hi,



i just came across this topic, is there any progress on this project?

And is it possible to share the beta image again, since i would like to test and help :slight_smile:



Thanks in advance!



Best regrads,

Peter