espressif / esp-box

The ESP-BOX is a new generation AIoT development platform released by Espressif Systems.
Apache License 2.0
714 stars 173 forks source link

Interest in switching to mono mp3s for reduced programming size? (AEGHB-86) #21

Closed chmorgan closed 1 year ago

chmorgan commented 2 years ago

For my application I've been looking at using mono mp3s for size, and because the es8311 codec is mono output only.

Would there be interest in a PR to switch the mp3s to mono, reduce the partition size to reduce programming, and the code to properly handle the mono mp3s? This part isn't too tricky but did require some test and debug and it could help the next person.

I'd like to get the ok that the idea made sense to the maintainers here.

alic-maker commented 2 years ago

Yes, I also thought about storing mono MP3 files in the beginning to save flash space. I'm not using mono now because I don't know how to configure es8311 and I2S of ESP32S3 to play mono audio correctly, playing directly will cause the playback speed to be double normal. Taking some time to solve this problem should be in our development plan later.

chmorgan commented 2 years ago

@alic-maker getting them to work is exactly what my pr would be as I’ve added support for mono here after a few hours of debugging. If I can get an admin for the project to “ok” the idea I’ll submit a pr. It’s clean, makes sense and it’s not complex, but don’t want to go through the effort without a green light in case no one is maintaining the repo actively and it could sit there for months or years.

ESP-Mars commented 2 years ago

hi, we welcome the feature via PR, the feature of switching mp3 to mono is very useful to use and what you are going to do is meaningful, dagongrener @alic-maker will look up the repo all the time. Espressif also has a Contributions Guide for anyone interested in contributing to our repositories.

chmorgan commented 2 years ago

Oh gotcha, didn’t realize alic-maker was an admin. I’ll submit an initial pr today.

chmorgan commented 2 years ago

@ESP-Mars @alic-maker opened https://github.com/espressif/esp-box/pull/22

lijunru-hub commented 1 year ago

The box playback must provide two channels of audio data and only the left channel is valid. The other channel will be ignored. You need to manually patch the single channel to dual channel

chmorgan commented 1 year ago

Closing as I've resolved mono support in playback.