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

[mimictts] Fix ssml and playing from audiosinks using the audio servlet #14120

Merged
merged 3 commits into from
Jan 14, 2023

Conversation

dalgwen
Copy link
Contributor

@dalgwen dalgwen commented Dec 30, 2022

Fix :

  • ssml not working
  • add an option to store the audio on a file before sending it to openhab. It enables audiosink based on the audio servlet to play the sound (the servlet requires the getClonedStream method, unavailable with a pure streaming approach). The files are stored in the user data directory and deleted as soon as possible (stream close detection).
  • fix error with voice name not encoded

Thanks rotec52 for spotting it and providing solution.

Signed-off-by: Gwendal Roulleau gwendal.roulleau@gmail.com

@dalgwen dalgwen added the bug An unexpected problem or unintended behavior of an add-on label Dec 30, 2022
@dalgwen dalgwen force-pushed the mimictts_fix_ssml_servlet_sink branch from 9c5be8e to 85e1fbf Compare December 30, 2022 16:27
@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/mimic-text-to-speech/137040/12

bundles/org.openhab.voice.mimictts/README.md Outdated Show resolved Hide resolved
if (!config.workaroundServletSink) {
return new InputStreamAudioStream(inputStreamFromMimic, AUDIO_FORMAT, length);
} else {
// Some audio sinks use the openHAB servlet to get audio. This servlet require the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for my information, which ones ?

Copy link
Contributor Author

@dalgwen dalgwen Jan 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only reproduced the issue and tested my fix against the chromecast binding, but a user also reports error with webaudio and yamaha musiccast.
Nobody complains, but as far as I remember, the squeezebox binding also uses the audio servlet.

@lolodomo lolodomo added the enhancement An enhancement or new feature for an existing add-on label Jan 4, 2023
…vlet

Fix :
- ssml not working
- add an option to store the audio on a file before sending it to openhab. It enables audiosink based on the audio servlet to play the sound (the servlet requires the getClonedStream method, unavailable with a pure streaming approach). The files are stored in the user data directory and deleted as soon as possible (stream close detection).
- fix error with voice name not encoded

Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
Rebasing. Remove i18n, typo in README, and year 2023

Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
@dalgwen dalgwen force-pushed the mimictts_fix_ssml_servlet_sink branch from 85e1fbf to 74f5191 Compare January 7, 2023 23:47
Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
Copy link
Contributor

@lolodomo lolodomo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you

@lolodomo lolodomo merged commit d497def into openhab:main Jan 14, 2023
@lolodomo lolodomo added this to the 4.0 milestone Jan 14, 2023
@dalgwen dalgwen deleted the mimictts_fix_ssml_servlet_sink branch February 6, 2023 22:54
nemerdaud pushed a commit to nemerdaud/openhab-addons that referenced this pull request Feb 28, 2023
…et (openhab#14120)

* [mimictts] Fix ssml and playing from an audiosink using the audio servlet

Fix :
- ssml not working
- add an option to store the audio on a file before sending it to openhab. It enables audiosink based on the audio servlet to play the sound (the servlet requires the getClonedStream method, unavailable with a pure streaming approach). The files are stored in the user data directory and deleted as soon as possible (stream close detection).
- fix error with voice name not encoded

Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
renescherer pushed a commit to renescherer/openhab-addons that referenced this pull request Mar 23, 2023
…et (openhab#14120)

* [mimictts] Fix ssml and playing from an audiosink using the audio servlet

Fix :
- ssml not working
- add an option to store the audio on a file before sending it to openhab. It enables audiosink based on the audio servlet to play the sound (the servlet requires the getClonedStream method, unavailable with a pure streaming approach). The files are stored in the user data directory and deleted as soon as possible (stream close detection).
- fix error with voice name not encoded

Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants