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

Discussion: AudioServlet and wav files #1350

Closed
t2000 opened this issue Feb 1, 2020 · 2 comments · Fixed by #2960
Closed

Discussion: AudioServlet and wav files #1350

t2000 opened this issue Feb 1, 2020 · 2 comments · Fixed by #2960
Labels
enhancement An enhancement or new feature of the Core PR pending

Comments

@t2000
Copy link
Contributor

t2000 commented Feb 1, 2020

I have just debugged why the PicoTTS service is not working with my Squeezebox installation.

I am running the Picoreplayer project with Logitech Media Server and squeezelite instances.

PicoTTS produces ".wav" files and openHAB serves them on its webserver. Browsers like Chromium are able to play it from there.

The squeezelite instance however, got the URL in its playlist correctly, but refuses to play it.

First I thought that my LMS or squeezelite has problems with wave files in a certain format, like earlier versions of these programs did, but that is not the case for me. I could add the file downloaded from openhab on the harddisk of the picoreplayer and play it from there without issues.

Then I setup an apache webserver on my development machine and served the wav file from there. Result was that the file could be played by squeezelite without issues!

Wireshark helped me to find the difference between apache and the openHAB audio servlet. It is right here:

Apache uses the type audio/x-wav instead.

For testing purposes I have edited the openHAB servlet to serve the wav files as audio/x-wav too. This is working perfectly fine. Squeezelite plays them without any issues!

by searching the internet I found that this isn't a new issue:
jshttp/mime-db#22

However, their recommendation audio/vnd.wave from http://tools.ietf.org/html/rfc2361 doesn't work for the squeezebox case.

Long story short: This leaves me to the question whether we could simply replace the audio/wav by audio/x-wav or if we have to enhance the code so we can somehow dynamically decide which mimetype to use.

Any suggestions?

AFAIK picoTTS is the only TTS service supported by openHAB that does NOT need a cloud connection, that is why I really want to use it!

@kaikreuzer
Copy link
Member

whether we could simply replace the audio/wav by audio/x-wav

Hm, in the linked issue it is said that audio/wav is probably the best choice and this is what we are doing right now. It is hence rather a buggy situation in the squeezebox software.

As you are saying that you're using LMS, wouldn't the best place to raise the issue be https://github.com/Logitech/slimserver?

@5iver
Copy link

5iver commented Feb 2, 2020

AFAIK picoTTS is the only TTS service supported by openHAB that does NOT need a cloud connection, that is why I really want to use it!

You can also use flite, which is much more robust than pico2wav. That is not the best link, but I will put a tutorial together in the forum for how I use it, including adjusting the voice, conversion to mp3, and appending an alert prefix sound, so you know there is an alert playing and not random people talking in the house! It's not available in a binding, but it shouldn't take much to create a binding for it. It works fine calling it in a script.

Just another option!

Rosi2143 pushed a commit to Rosi2143/openhab-core that referenced this issue Dec 26, 2020
* Edits to model page

Signed-off-by: Bob Adair <bob.github@att.net>

* Update tutorials/getting_started/model.md

Co-authored-by: Jerome Luckenbach <github@luckenba.ch>

Co-authored-by: Jerome Luckenbach <github@luckenba.ch>
@J-N-K J-N-K added enhancement An enhancement or new feature of the Core PR pending labels May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature of the Core PR pending
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants