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

add audio_webfile_start/audio_webfile_data_received/audio_stopped callbacks #667

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

freddy36
Copy link
Contributor

Adds the following callbacks:

void audio_stopped(const uint32_t pos) // called after audio has stopped
void audio_webfile_data_received(const uint8_t *writePtr, const int16_t bytesWritten) // called after data has been received from a web file stream
void audio_webfile_start(const bool isTTS, const char *lastHost) // the webfile stream starts

And adds the existing audio_eof_stream callback to the readme

@schreibfaul1
Copy link
Owner

What can you use it for?

@freddy36
Copy link
Contributor Author

I'm using it to stream webfiles and save them to SD while playing.

Copy link

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the stale label Mar 16, 2024
@freddy36 freddy36 force-pushed the callbacks branch 4 times, most recently from b8e4171 to a204cf1 Compare March 25, 2024 16:42
@freddy36
Copy link
Contributor Author

I've rebased the PR. Do you have any alternative suggestion for the use case?

@github-actions github-actions bot removed the stale label Mar 26, 2024
@cziter15
Copy link
Contributor

Might be useful to cache TTS. For example I use TTS to get notified about Home Assistant TTS events.

Imagine you have TTS notifications like "Hey, a movement has been detected in basement". Instead of asking for TTS sentence, it can be cached using md5 of the sentence adding the language as salt.

Seems like a good feature candidate anyway.

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

Successfully merging this pull request may close these issues.

None yet

3 participants