Open mmatus1112 opened 1 year ago
Very similar issue here with ESP Muse Luxe, white noise comes out instead of actual content. TTS works fine. There's an additional issue raised under https://github.com/esphome/media-players/issues/29
Can this be related to i2s configuration, e.g. bits per sample, sample rate, number of channels, and so on. The issue is that the external DAC must be reconfigured which isn't possible right now with esphome.
Maybe tts is 16kHz mono but the mp3 is 44.1kHz stereo?
I'm also trying to configure I2S for Sonoff TX Ultimate switch but get a lot of white noise covering the actual sound. I've tried different mp3's with varied sample and bit rates as well as TTS from Home Assistant
Here's a video with the sound sample https://twitter.com/blakadder_/status/1661863695788433409?s=20
@blakadder: from your twitter video, your can hear the music, so it could be that you are mixing one channel with the music (let say the left one) and one without data or random data (the right one), when rendered to a mono speaker. have you tried to change stereo to mono ?
Yes, that was the first thing I tried. I've tested further and I'm getting the same issue in Tasmota when playing an mp3 but not when using it's built in text to speech function and lowering the gain to 0.3
After some updates by Home Assistant and ESPHome, now the problem has gone even worse. After all the updates, even the TTS is sounding terrible. Is anybody actually working on this problem?
I've been testing various formats and managed to get somewhat decent sound out of the TX Ultimate by lowering the volume to 5% (lowest it can go to produce sound) and using 8bit PCM WAV files
Well, i figured out what's wrong in my case. my TM8211 DAC (and its other xx8211 versions) digital input timing format follows the Least significant bit justified (LSBJ), referred to as the Japanese input format. Same seems to be the case with the OP DAC when checking its datasheet
update: the answer lies in this function https://github.com/esphome/ESP32-audioI2S/blob/07cb6eb71fbc47d45185270b5c84c762a126bbc3/src/Audio.cpp#L4408 but no clue on how to set it from yaml
Well, i figured out what's wrong in my case. my TM8211 DAC (and its other xx8211 versions) digital input timing format follows the Least significant bit justified (LSBJ), referred to as the Japanese input format. Same seems to be the case with the OP DAC when checking its datasheet
update: the answer lies in this function https://github.com/esphome/ESP32-audioI2S/blob/07cb6eb71fbc47d45185270b5c84c762a126bbc3/src/Audio.cpp#L4408 but no clue on how to set it from yaml
I reached the same conclusion for the TX Ultimate. It's not currently possible to specifiy the timing format from yaml, but I've forked the project, changed it and... it works, but volume is a little too low for the moment
If you want to test, I've pushed a PR: https://github.com/esphome/esphome/pull/4918
update: Update 2023.6.0 broke the working I2S_Audio. It WAS working without any issues for TTS, Radio and mp3. I see there is a change on I2S on the update. Is there any more direct and responsive place to post the issues?
update: Update 2023.6.0 broke the working I2S_Audio. It WAS working without any issues for TTS, Radio and mp3. I see there is a change on I2S on the update. Is there any more direct and responsive place to post the issues?
Have you checked the changelog? There are a few changes in 2023.6
This comes to my mind: https://github.com/esphome/esphome/pull/4884
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
this is still an issue.
The problem
Hi all, I am having issues with my i2s_audio.
I am using an ESP32 with an external DAC → UDA1334A and my wiring diagram is as follows:
My ESPHOME configuration is below.
I am able to see my media player on my Home Assistant and I can play TTS without any issues. The sound is really clear and really nice. However, when I try to play a 5 seconds mp3 sound (an alarm), I can only hear a "white" noise (like an old radio playing noise). I try playing the same audio in my PC speakers (Browser) and I can hear it without issues. Same thing happens when I try to play from an online radio station (all from Home Assistant Media Tab).
I am unsure of what the issue is but I have exhausted my ideas on what the problem is. I have tried multiple devices, but I get the same problem. I would appreciate some help!!!
Thank you!
Which version of ESPHome has the issue?
2023.5.3
What type of installation are you using?
Home Assistant Add-on
Which version of Home Assistant has the issue?
Home Assistant 2023.5.3
What platform are you using?
ESP32
Board
No response
Component causing the issue
i2s_audio
Example YAML snippet
Anything in the logs that might be useful for us?
No response
Additional information
No response