feature-requests icon indicating copy to clipboard operation
feature-requests copied to clipboard

add esp-idf media_player support

Open alfwro13 opened this issue 1 year ago • 14 comments

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

Please add support for media_player component on esp-idf framework. Many esphome features now recommend using esp-idf framework (i.e. bluetooth proxy) however media player still only work on arduino framework.

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

Currently media player is only available on arduino framework and when trying to compile this code:

i2s_audio:
  - id: i2s_out
    i2s_lrclk_pin: 44
    i2s_bclk_pin: 36

media_player:
  - platform: i2s_audio
    name: Media Player
    id: media_out
    i2s_audio_id: i2s_out
    dac_type: external
    i2s_dout_pin: 35
    mode: mono

I get: This feature is only available with frameworks [‘arduino’].

Additional context

alfwro13 avatar Oct 13 '23 15:10 alfwro13

same problem too.

amj3brg avatar Oct 14 '23 08:10 amj3brg

This would be very helpful, since it would allow the possibility to use your voice assistant device (i.e. M5Stack Atom Echo) as a TTS speaker for notifications from Home Assistant. Unless there's already another way to do that within the ESP-IDF libraries...

jarodwsams avatar Nov 04 '23 12:11 jarodwsams

I think this would be the same issue/feature-request Add media player to echo voice assistant

MorganMLGman avatar Nov 09 '23 14:11 MorganMLGman

I think this would be the same issue/feature-request Add media player to echo voice assistant

hi, not really. the tts echo is bounded by that fact where esphome not able to play wav/raw sources. ESPHome can echo only from http (not https) mp3 tts streams. piper and other recommended tts are transfer wav objects. check it on: https://github.com/home-assistant/core/issues/92969

the original issue is related only with stt/wakeword compatibility

cociweb avatar Nov 09 '23 19:11 cociweb

I just uploaded a a first version of a custom component (https://github.com/gnumpi/esphome_audio) which aims to provide access to the Espressif Audio Development Framework (ADF) from ESPHome. It also implements a media_player which makes use of the adf pipeline concept. So far I tested it on a ESP32-S3-DevKitC-1 and on a MatrixIo-Voice. Is anyone willing to test it on their devices? There is still some work to do for making the component more configurable. It is definitely not in a ready to use status yet, but I would greatly appreciate any feedback you can provide on this.

gnumpi avatar Feb 08 '24 01:02 gnumpi

Hello I can test but i ONLY have esp32 wrover.

Best regards José Amaral

Enviado de Outlook para Androidhttps://aka.ms/AAb9ysg


From: Mischa Siekmann @.> Sent: Thursday, February 8, 2024 1:36:00 AM To: esphome/feature-requests @.> Cc: amj3brg @.>; Comment @.> Subject: Re: [esphome/feature-requests] add esp-idf media_player support (Issue #2429)

I just uploaded a a first version of a custom component (https://github.com/gnumpi/esphome_audio) which aims to provide access to the Espressif Audio Development Framework (ADF) from ESPHome. It also implements a media_player which makes use of the adf pipeline concept. So far I tested it on a ESP32-S3-DevKitC-1 and on a MatrixIo-Voice. Is anyone willing to test it on their devices? There is still some work to do for making the component more configurable. It is definitely not in a ready to use status yet, but I would greatly appreciate any feedback you can provide on this.

— Reply to this email directly, view it on GitHubhttps://github.com/esphome/feature-requests/issues/2429#issuecomment-1933228008, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANMEA5355S5ZMGMRHOYQBB3YSQTYBAVCNFSM6AAAAAA57KANDCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZTGIZDQMBQHA. You are receiving this because you commented.Message ID: @.***>

amj3brg avatar Feb 08 '24 18:02 amj3brg

Thanks @amj3brg, that would be awesome. I managed to run it on a matrixio-voice now, which only has an esp32-wroom. So, I guess an esp32 wrover should be fine.

gnumpi avatar Feb 09 '24 02:02 gnumpi

hello this weekend i will prepare de code for my wrover that use this project with wrover. https://www.youtube.com/watch?v=McE6lsnmvBQ i invited you to join my group on facebook to share projects. https://www.facebook.com/groups/3416472405264998 [cid:c79bf40b-08ba-4264-8975-31b0f64e772c] [https://www.bing.com/th?id=OVP.KTSqlY-uEY5nf11fhX1L3QEsDh&pid=Api]https://www.youtube.com/watch?v=McE6lsnmvBQ Um assistente de voz para o Home Assistant com integração local/Cloud - Made in Portugalhttps://www.youtube.com/watch?v=McE6lsnmvBQ Tal como prometido aqui fica então vídeo do assistente de voz criado pelo José Amaral made in Portugal . Se és daqueles que vai seguindo o projeto Home Assistant sabes que o ano 2023 foi o ano dedicado pela equipa desenvolvimento desta plataforma a voz ( Voice). E este projeto é então um dispositivo que explora essa mesma funcionalidade ... www.youtube.com


De: Mischa Siekmann @.> Enviado: 9 de fevereiro de 2024 02:52 Para: esphome/feature-requests @.> Cc: amj3brg @.>; Mention @.> Assunto: Re: [esphome/feature-requests] add esp-idf media_player support (Issue #2429)

Thanks @amj3brghttps://github.com/amj3brg, that would be awesome. I managed to run it on a matrixio-voice now, which only has an esp32-wroom. So, I guess an esp32 wrover should be fine.

— Reply to this email directly, view it on GitHubhttps://github.com/esphome/feature-requests/issues/2429#issuecomment-1935260554, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANMEA55XQJWF75NIYYZF7MLYSWFONAVCNFSM6AAAAAA57KANDCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZVGI3DANJVGQ. You are receiving this because you were mentioned.Message ID: @.***>

amj3brg avatar Feb 09 '24 09:02 amj3brg

Does it mean that we can replace ADF speaker with this media_player for S3-BOX based voice satellite?

formatBCE avatar Feb 23 '24 16:02 formatBCE

@formatBCE, yes, that's the general idea, there are still some issues to be resolved, but I'm on it...

gnumpi avatar Feb 23 '24 23:02 gnumpi

@formatBCE, yes, that's the general idea, there are still some issues to be resolved, but I'm on it...

Great to hear it! Awesome news!

formatBCE avatar Feb 24 '24 00:02 formatBCE

Hello I trie to adapt de code for my box but i can't do it. It gives error. I'm no very goog with yaml.

Best regards José Amaral

Enviado de Outlook para Androidhttps://aka.ms/AAb9ysg


From: formatBCE @.> Sent: Saturday, February 24, 2024 12:09:19 AM To: esphome/feature-requests @.> Cc: amj3brg @.>; Mention @.> Subject: Re: [esphome/feature-requests] add esp-idf media_player support (Issue #2429)

@formatBCEhttps://github.com/formatBCE, yes, that's the general idea, there are still some issues to be resolved, but I'm on it...

Great to hear it! Awesome news!

— Reply to this email directly, view it on GitHubhttps://github.com/esphome/feature-requests/issues/2429#issuecomment-1962160103, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANMEA5ZV3NOE3UITRAT734LYVEVS7AVCNFSM6AAAAAA57KANDCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRSGE3DAMJQGM. You are receiving this because you were mentioned.Message ID: @.***>

amj3brg avatar Feb 24 '24 00:02 amj3brg

@amj3brg there's code for Box and Box-3, which works good. But it's using adf directly - which, I believe, just a wrap on top of idf framework, and could be replaced easily. But I'm not good with idf - so I'm just carefully waiting for adf Media player to come. :)

formatBCE avatar Feb 24 '24 00:02 formatBCE

any news? I use this type of display ESP32-4848S040 (mcu:ESP32-S3 display:ST7701 touch:GT911 and speaker NS4168), which also has an integrated speaker. The whole device is not officially supported in esphome because the display is ST7701 and works only on an unofficial component(https://github.com/esphome/esphome/pull/5872) under ESP-IDF, so it would be nice to integrate media_player into ESP-IDF as well.

tiimsvk avatar Mar 06 '24 12:03 tiimsvk