audio over espnow: data transfer rate ? #393
-
Hello, |
Beta Was this translation helpful? Give feedback.
Replies: 15 comments 13 replies
-
Unfortunately I did not manage to have working either. |
Beta Was this translation helpful? Give feedback.
-
I could get a better rate by replacing the API call
|
Beta Was this translation helpful? Give feedback.
-
Thanks for your feed-back. I have updated my code to use your proposed logic... |
Beta Was this translation helpful? Give feedback.
-
I could manage to transfer up to 48Khz uncompressed sample rate, with good quality with a physical rate of 54 Mbits . Unfortunately the transmission of audio suffers from small errors in the transmission which create loud crackling/popping noises here and there. Enlarging buffers helps with this issue, but i could not make it go away 100% ( also the latency goes up) . I am wondering how "professional" audio transmission systems deal with this? Is there a "simple to use" error correction functionality out there ? ( I could not find anything, that I could use in the arduino environment). Since I only need mono transmission, maybe the second audio channel could be used for this ? The same way symmetric cabeling works: removing static noise by inverting and re-inverting the phase which cancels out the noise. In terms of samples, the second channel could be used to fix errors in the first channel? Any Ideas are appreciated! Thanks |
Beta Was this translation helpful? Give feedback.
-
I suggest that you try to use a codec. |
Beta Was this translation helpful? Give feedback.
-
I tried the LC3 but with strange sounding results. I will try the aptx as
well. Thanks!
Am Fr., 14. Okt. 2022 um 10:36 Uhr schrieb Phil Schatzmann <
***@***.***>:
… I suggest that you try to use a codec.
I would guess that the ones used by bluetooth might be a good choice: aptx
or lc3
—
Reply to this email directly, view it on GitHub
<#393 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADMD7IWKLVLDD4MSAYYZEDWDELPNANCNFSM6AAAAAAQ4NNNIM>
.
You are receiving this because you authored the thread.Message ID:
<pschatzmann/arduino-audio-tools/repo-discussions/393/comments/3877087@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
I have very good results with the LC3 now! it turns out reading the manual is helpful sometimes :-) |
Beta Was this translation helpful? Give feedback.
-
please read the doc on Lc3:
https://www.bluetooth.com/specifications/specs/low-complexity-communication-codec-1-0/
In the first pdf, there is a table ( section 2.2 table 2.1 )
Please note that 44Khz is not supported in this library.
I used 48kHz, 16bit, 1 channel, 720byte stream buffer ( 360x2)
for the i2S, I used 8 buffers with 90 bytes size
but I can't share the code unfortunately.
Good luck
Michael
Am Sa., 22. Apr. 2023 um 13:34 Uhr schrieb jajito ***@***.***
…:
Hi mkoenings.
And hi Phil and tjanks for your marvellous work in thieese libraries.
I'm trying to configure LC3, but only get cracks.
How do you pass this parameters (specially the buffer sizes) to LC3?
Could you send some code?
Thanks!
—
Reply to this email directly, view it on GitHub
<#393 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADMD7NTRT6TFZ4EUFAYODDXCO64VANCNFSM6AAAAAAQ4NNNIM>
.
You are receiving this because you authored the thread.Message ID:
<pschatzmann/arduino-audio-tools/repo-discussions/393/comments/5694663@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
ltry like this:
StreamCopy copier(encoder, kit, 720);
Am Sa., 22. Apr. 2023 um 17:24 Uhr schrieb jajito ***@***.***
…:
AudioKitStream kit; // Access I2S as stream
And this is the configuration of LC3encoder, espnow and the Lyrat.
ESPNowStream now;
EncodedAudioStream encoder(&now, new LC3Encoder()); // encode and write to ESP-now
StreamCopy copier(encoder, kit); // copies sound into i2s
—
Reply to this email directly, view it on GitHub
<#393 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADMD7K6FJPJAZENBZRH3XTXCPZ4HANCNFSM6AAAAAAQ4NNNIM>
.
You are receiving this because you authored the thread.Message ID:
<pschatzmann/arduino-audio-tools/repo-discussions/393/comments/5695690@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
I just added an example with an SBC codec and it was working at the first trial... |
Beta Was this translation helpful? Give feedback.
-
I think the following might be worth to consider:
Not sure if this really helps, but I would try to use a consistent buffer size which would be the size (or a multiple) of an encoded packet. As you have noticed, any buffer is adding a lag. However it is critical to have enough data in the buffer to prevent any buffer underflow which will cause artifacts |
Beta Was this translation helpful? Give feedback.
-
I observe with espnow some time data send fail and can confirm that data
send fail with acknowledgment . so in this scenario if buffer is at
receiver and data send fail then You send that data again or you ignore the
fail data and send new fresh packets ?
I observe with espnow some time half of data send fail and some time all
data send success . . so how have deal this within your library ?
Message ID:
… <pschatzmann/arduino-audio-tools/repo-discussions/393/comments/5711575@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
Did you ever look at the available ESPNowStreamConfig parameters ? |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Thanks and apology for miss reading .
You used Default delay after success write is 2 ms ? Why it is required ?
Why no delay after success write ? What is its advantages ?
And which buffer data will be store if espnow write failed ? What if this
buffer overflow ? What is maximum size of this buffer ?
also i notice with espnow when i cover espnow around with hand or box then data transfer of espnow reduce allot . did you observe the same ? If yes how you handle this ?
further i don't have latency issue so what are your recommended parameter for this scenario ?
|
Beta Was this translation helpful? Give feedback.
Thanks for your feed-back. I have updated my code to use your proposed logic...