Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playing a embedded audio file #2704

Open
ChrisOboe opened this issue Apr 28, 2024 · 2 comments
Open

Playing a embedded audio file #2704

ChrisOboe opened this issue Apr 28, 2024 · 2 comments

Comments

@ChrisOboe
Copy link

ChrisOboe commented Apr 28, 2024

Describe the problem you have/What new integration you would like

Currently media player is only able to play media from an url. I'd like to play media from an embedded file (e.g. in a byte array).

Please describe your use case for this integration and alternatives you've tried:

I've built a door bell based on esphome with i2s_audio and media player and and amplifier. It works fine as long as the device has network connection. But i need a fallback, to play a sound even if there is no network connection.

As a workarround i will try to use speaker play to play raw audio. But in that case i assume i will loose the codec support of media player. So the audio will propably be very limited by the space available.

Additional context

@nagyrobi
Copy link
Member

A config similar to img would be useful, referencing a file to be embedded in the binary.

@docteurzoidberg
Copy link

docteurzoidberg commented May 26, 2024

definetly need embedding sounds for my projects. the actual uses of dfplayer seems obsolete for low bitrate sounds / just a fancy bip or startup sound. It's thing i've done on old ATTINY85 so it could work on a esp ^^
I have a quack.h sound i would love to embed in my esphome projects with buzzers/speakers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants