Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

Use local TTS with squeezebox on Windows

pgfeller edited this page Jan 3, 2016 · 8 revisions

This page is based on the findings during discussion in the OH community forum @ [1]. If you need support related to this page please visit the forum @ Use local TTS with squeezebox on Windows.



Environment Requirements

To verify if your system provides decent text-to-speech ability I recommend to download "Balabolka" [2]. Verify that a SAPI 5 voice is available for your language and that it's quality is decent enough.

Balabolka - SAPI 5

If the voice quality is not sufficient, or the desired language is missing you may consider a commercial SAPI 5 voice. Only use trial versions until your openHAB TTS is working end-to-end, as I can not know if the solution is compatible with all voices.

To use this with squeezebox binding you need a recent 1.8.0 snapshot (or newer) build of the squeezebox add-ons; available from cloudbees [4].

REST-TTS service

One way to use OS-TTS with openHAB (e.g. Squeezebox) is to provide a REST API that will convert a text string to an .mp3 file with the respective spoken text. The software available from [3] provides such an API.

Extract the downloaded .zip package. This will provide you the source code of the utility (can be compiled using M$-VS 2013 community edition) as well as some pre-compiled ready to use files (.\RESTTTS\RESTTTS\bin\Release).

Configuration

REST-TTS

To keep things as simple as possible the tool is a self hosted REST service. This requires elevated rights on your system. Therefore either compile the binaries yourself (after review of the code), or if you use a pre-compiled version make sure you scan it with a recent anti-virus software.

Right-click the "RESTTTS.exe" and execute it as administrator; you should see something similar to this: REST TTS with default configuration

Enter the following URL in a new browser window (or tab): "http://127.0.0.1:8089/Service/TTS?text=Test"; an .mp3 file should be received by the browser. Once that 1st test works ok close the REST service again (just select the window and press enter).

Now open "RESTTTS.exe.config" and replace the loopback address with your actual IP (e.g. 192.168.1.100). If you prefer a different voice, enter the voice id as well (e.g. "TTS_MS_EN-US_ZIRA_11.0"):

RESTTTS.exe.config

Start the service after the configuration change and check that the new settings were applied.

Operating System

By default the firewall of the operating system will not allow external systems to access the service from other computers in your network. Therefore you need to configure an exception that you allow incoming request to the configured port (e.g. 8089) from the local network.

Verify that this works correctly with a browser from a different computer in you network using the configured network address and port (e.g. http://192.168.1.100:8089/Service/TTS?text=Test).

OpenHAB

Now you can change the openHAB configuration to instruct squeezebox to use this service:

squeeze:ttsurl               = http://192.168.10.100:8089/Service/TTS?text=%s
squeeze:ttsmaxsentencelength = 4096

References

Installation


User Interfaces


Community

(link to openHAB forum)

Development



Misc


Samples

A good source of inspiration and tips from users gathered over the years. Be aware that things may have changed since they were written and some examples might not work correctly.

Please update the wiki if you do come across any out of date information.

Use case examples

Collections of Rules on a single page

Single Rules

Scripts


Release Notes

Clone this wiki locally