Audio File Media Source
The audio_file media source platform plays audio files that have been embedded into the firmware
using the Audio File component.
Files are played using the audio-file:// URI scheme; the part after audio-file:// is used as the
id of the audio file to play.
This component only works on ESP32 based chips.
# Example configuration entryaudio_file: - id: alert_sound file: "sounds/alert.wav" - id: timer_sound file: "https://github.com/esphome/home-assistant-voice-pe/raw/dev/sounds/timer_finished.flac"
media_source: - platform: audio_file id: file_sourceTo play a file, send the media URL audio-file://alert_sound to a media player that uses this
media source.
Configuration variables
Section titled “Configuration variables”- id (Optional, ID): Manually specify the ID for this media source.
- task_stack_in_psram (Optional, boolean): If
true, the FreeRTOS decode task stack is allocated in PSRAM instead of internal RAM. Requires the psram component. Defaults tofalse. - All other options from Media Source.