respeaker / usb_4_mic_array

ReSpeaker 4 Mic Array with builtin VAD, DOA, AEC, Beamforming & NS
https://www.seeedstudio.com/ReSpeaker-Mic-Array-v2.0-p-3053.html
Apache License 2.0
141 stars 65 forks source link

16khz limit #9

Open taospartan opened 6 years ago

taospartan commented 6 years ago

Is the 16khz limit on the 4 mic array a hardware or firmware limit?

Many thanks

xiongyihui commented 6 years ago

It's limited by the build-in algorithms.

taospartan commented 6 years ago

Is there any plan for a firmware version that bypasses the algorithms to all 22khz or 44.1khz and just provides usb access to the 4 channels?

Sent from my iPhone

On 24 Jul 2018, at 11:52, Yihui Xiong notifications@github.com wrote:

It's limited by the build-in algorithms.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

taospartan commented 6 years ago

^^^allow

Sent from my iPhone

On 24 Jul 2018, at 12:59, Rich Gunton richgunton@gmail.com wrote:

Is there any plan for a firmware version that bypasses the algorithms to all 22khz or 44.1khz and just provides usb access to the 4 channels?

Sent from my iPhone

On 24 Jul 2018, at 11:52, Yihui Xiong notifications@github.com wrote:

It's limited by the build-in algorithms.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

xiongyihui commented 6 years ago

No plan yet

taospartan commented 6 years ago

If I got enough support from the community would you consider implementing it?

Many thanks

Sent from my iPhone

On 25 Jul 2018, at 03:45, Yihui Xiong notifications@github.com wrote:

No plan yet

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

xiongyihui commented 6 years ago

Sure, if 32+ people need this feature, we'll take some time to implement it. Let's vote!

Flowr-es commented 6 years ago

This limit seems also to be for the audio output. +1

alexoakland commented 6 years ago

This would be useful. +1

imnotwithhim commented 6 years ago

What he said ☝️

ademaine commented 6 years ago

+1 Like the sound of this

the-intercept0r commented 6 years ago

Be a really useful change +1 👍

tahiti25 commented 6 years ago

would be to me too I am in thanks

Stu4rt18 commented 6 years ago

That'd be very useful

foxyd666 commented 6 years ago

i agree, that would be brilliant!

baileypaul commented 6 years ago

This upgrade would be very useful

Mark412 commented 6 years ago

This would be very handy +1

ghost commented 6 years ago

Upgrade would be awesome +1

Whuzz commented 6 years ago

+1, would love that upgrade!

bc107pooh commented 6 years ago

+1, yes please include feature for best sound creation

iambarrief commented 6 years ago

This would be a good upgrade! Thanks

PiteousHonking commented 6 years ago

Also interested in this if you could do it. Thanks

xiongyihui commented 5 years ago

Thanks for all your feedback! We have been trying to implement the feature now!

taospartan commented 5 years ago

That’s great !!

Many thanks

Sent from my iPhone

On 14 Sep 2018, at 10:38, Yihui Xiong notifications@github.com wrote:

Thanks for all your feedback! We have been trying to implement the feature now!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

xiongyihui commented 5 years ago

Hello there, this is a 48k sample rate firmware for testing:

respeaker_usb_mic_array_48k.zip

Download the zip file and unzip it, there will be two firmware, one has 6 channels, another has 1 channel. Use the dfu.py of this repo to upgrade the firmware:

python dfu.py --download 48k_6channels.bin

After more tests, we will release it.

Flowr-es commented 5 years ago

Cool, will test it today! I will provide feedback :-)

So I tested it and it works. Audio output quality is good. I did not tested the microphones on higher rates

Update: I'm not sure but it appears to me that once audio output is starting the first second of the audio output is cut off...

taospartan commented 5 years ago

I've tested it and it appears to work fine:) has it got the 12dB gain applied?

xiongyihui commented 5 years ago

Thanks for the quick feedback!

@taospartan 6dB gain is applied. What's your thought of the gain?

@MexXxo I didn't re-product the issue when I tested it with Audacity on Ubuntu 16.04. What's your test enviroment?

taospartan commented 5 years ago

In regards the gain, as I’ve been using odas I’ve found the 12 dB gain firmware to be preferable as it allows detection at greater ranges.

On a side note when using low powered embedded devices remapping the 6 channels to 4 takes excess processing power, would it be possible to just have a pure 4 channel version to allow devices such as pi zero?

Many thanks

Tao

Sent from my iPhone

On 20 Sep 2018, at 03:29, Yihui Xiong notifications@github.com wrote:

Thanks for the quick feedback!

@taospartan 6dB gain is applied. What's your thought of the gain?

@MexXxo I didn't re-product the issue when I tested it with Audacity on Ubuntu 16.04. What's your test enviroment?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

Flowr-es commented 5 years ago

@xiongyihui my testing environment is a raspberry pi 3 and I'm using the node js speaker module + pulseaudio

dscripka commented 5 years ago

A little late to this issue, but I've done some testing with the 48 kHz firmware (using the versions provided in the repo), and noticed two things:

1) Despite the driver showing 48 kHz output (Windows and Ubuntu), there are audio artifacts that make the sound quality poor. Testing with the original 16 kHz output firmware, there are no artifacts, just lower overall quality as would be expected with the lower sample rate.

2) AEC performance is significantly worse with the 48 kHz firmware.

Is there still on-going testing on the 48 Khz firmware? So far, the V2 mic array is working really well from a capture perspective, but the low-quality playback really limits potential applications (at least for me).

Flowr-es commented 5 years ago

Are you still working on the array, or have you dropped the support for this at all?

BuiltByTy commented 5 years ago

I'm currently using the ReSpeaker 6 Mic for the Raspberry Pi, has there been any update for the algorithms to use 48KHz?

mathquis commented 5 years ago

I concur with @dscripka report. I've tested the 48kHz firmwares (both 1 channel and 6 channels). The 6 channels version just output saturated sounds (not usable). The 1 channel version output 48kHz rate (clear audio) but with strange "sh" artifacts rendering poor audio quality. Is it something that can be improved? Are you guys at Seeed still working on the ReSpeaker Mic Array v2?

cellfride commented 4 years ago

YES for a firmware version that bypasses the algorithms to all 22khz or 44.1khz!!

carllhsiung commented 4 years ago

Hi, Does the 48kHz firmwares have something wrong? I recorded impulse sound with ReSpeaker Mic Array v2.0 by using following command in Ubuntu 16.04: (--rate 16000 for 6_channels_firmware.bin and --rate 48000 for 48k_6_channels_firmware.bin) parecord -d alsa_input.usb-SEEED_ReSpeaker_4_Mic_Array__UAC1.0_-00.multichannel-input -v --channels 6 --rate 16000 respeaker.wav

The 6_channels_firmware.bin waveform: respeaker-16k.wav 16khz

The 48k_6_channels_firmware.bin waveform: respeaker-48k.wav Please see Figure 1. Does 48kHz waveform be up-sampled from 16kHz waveform? 48khz

My matble/octave code:

close all
clear all

filePath = 'respeaker-48k.wav';

[x, fs] = audioread(filePath);
[maxValue, maxIndex] = max(abs(x(:, 3)));
maxIndex = maxIndex - 40;
maxAmplitude = max(abs(x(:)));
disp(['max time = ' num2str(maxIndex / fs)])

figure
subplot(3, 1, 1)
hold on
for ii = 2:3
    stem(x(maxIndex:maxIndex+100, ii))
end
ylim([-maxAmplitude maxAmplitude])
ylabel('Amplitude')
xlabel('Time index')
legend('Channel 1', 'Channel 2')

subplot(3, 1, 2)
hold on
for ii = 3:4
    stem(x(maxIndex:maxIndex+100, ii))
end
ylim([-maxAmplitude maxAmplitude])
ylabel('Amplitude')
xlabel('Time index')
legend('Channel 2', 'Channel 3')

subplot(3, 1, 3)
hold on
for ii = 4:5
    stem(x(maxIndex:maxIndex+100, ii))
end
ylim([-maxAmplitude maxAmplitude])
ylabel('Amplitude')
xlabel('Time index')
legend('Channel 3', 'Channel 4')

figure
for ii = 2:5
    subplot(4, 1, ii - 1)
    plot([1 : length(x)] / fs, x(:, ii))
    [maxValue, maxIndex] = max(abs(x(:, ii)));
    maxIndex
    ylim([-maxAmplitude maxAmplitude])
    title(['Channel ' num2str(ii - 1) ...
        ', max amplitude = ' num2str(maxValue) ...
        ', max time index = ' num2str(maxIndex)])
    ylabel('Amplitude')
    xlabel('Time (sec.)')
end

figure
hold on
for ii = 2:5
    plot([1 : length(x)] / fs, x(:, ii))
end
ylim([-maxAmplitude maxAmplitude])
ylabel('Amplitude')
xlabel('Time (sec.)')
legend('Channel 1', 'Channel 2', 'Channel 3', 'Channel 4')

My hardware info: pactl list sources

Source #17 State: SUSPENDED Name: alsa_input.usb-SEEED_ReSpeaker_4_Mic_ArrayUAC1.0_-00.multichannel-input Description: ReSpeaker 4 Mic Array (UAC1.0) Multichannel Driver: module-alsa-card.c Sample Specification: s16le 6ch 16000Hz Channel Map: front-left,front-right,rear-left,rear-right,front-center,lfe Owner Module: 31 ... Properties: alsa.resolution_bits = "16" device.api = "alsa" device.class = "sound" alsa.class = "generic" alsa.subclass = "generic-mix" alsa.name = "USB Audio" alsa.id = "USB Audio" alsa.subdevice = "0" alsa.subdevice_name = "subdevice #0" alsa.device = "0" alsa.card = "1" alsa.card_name = "ReSpeaker 4 Mic Array (UAC1.0)" alsa.long_card_name = "SEEED ReSpeaker 4 Mic Array (UAC1.0) at usb-0000:00:14.0-8, full speed" alsa.driver_name = "snd_usb_audio" device.bus_path = "pci-0000:00:14.0-usb-0:8:1.0" sysfs.path = "/devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.0/sound/card1" udev.id = "usb-SEEED_ReSpeaker_4_Mic_ArrayUAC1.0_-00" device.bus = "usb" device.vendor.id = "2886" device.vendor.name = "SEEED" device.product.id = "0018" device.product.name = "ReSpeaker 4 Mic Array (UAC1.0)" device.serial = "SEEED_ReSpeaker_4_Mic_Array_UAC1.0" device.form_factor = "speaker" device.string = "hw:1" device.buffering.buffer_size = "384000" device.buffering.fragment_size = "192000" device.access_mode = "mmap+timer" device.profile.name = "multichannel-input" device.profile.description = "Multichannel" device.description = "ReSpeaker 4 Mic Array (UAC1.0) Multichannel" alsa.mixer_name = "USB Mixer" alsa.components = "USB2886:0018" module-udev-detect.discovered = "1" device.icon_name = "audio-speakers-usb"

Thanks.

alexbarcelo commented 3 years ago

I see that there are 48k firmware files here, but I wonder how does this affect the device. I am very happy on the current ASR and noise reduction right now, and fear that this firmware will hinder that. I want a higher sample rate for the output, as the audio quality is important in my setup (I had this plugged to my sound system).

Could I have a 16k for algorithms + 44k for audio output firmware? Is this something that may interest other people? Is that easy to achieve? I don't know if it is a simple flag change + recompile or I am asking for something technically unachievable... Hope its not the latter!

fquirin commented 2 years ago

The 48khz files have been removed with the latest commit (January 2021) and there is some info about flashing the 2.0.0 version onto a newer device. The warning says not upgradeable. Does this mean I can never go back to 3.0.0 if I'd try out the v2.0.0 48khz files ? Or do I simply have to use the factory reset? (python3 dfu.py --revertfactory ?)

dvdokkum commented 2 years ago

@fquirin did you ever try flashing the 48khz version to the new hardware? able to reset back to 3.0.0?

fquirin commented 2 years ago

never dared to try :cry:

viet98lx commented 9 months ago

@fquirin @dvdokkum so far, Has anyone of you tried flashing 48kHz version to mic array v2?

rollyfx commented 7 months ago

Do not flash the new array with 48k firmware ! It's impossible to revert and sound quality is still bad.

I'm really desapointed by Seedstudio , 80€ for such crap which is not capable of exceeding 16khz and on top of that by not mentioning it on the product sheets of the store! 😡

joie96 commented 7 months ago

I've got the same issue. This is really sad, because I've never had such a great ASR experience. But since the sound is so bad, it's essentially useless.

joie96 commented 7 months ago

As a little workaround I'm now using an higher quality external USB sound card in combination with pulseaudio module-combine-sink. So the audio ist duplicated to my USB sound card and to respeaker but the actual speaker is only connected to the USB sound card. I was hoping that if there is a audio signal on the respeaker then the AEC kicks in.

Update: Sadly it doest not work very well.