Google Home Audio & TTS
![Dependency version](https://david-dm.org/dkern/google-home-audio-tts.png)
Library to play audio and text via TTS on Google Home devices.
Table Of Contents
Installation
Use npm to install this module:
$ npm install google-home-audio-tts
Usage
The library uses callback-style.
Just initialize a new instance for a single device, it can be reused at any time.
let GoogleHomeAVT = require('google-home-audio-tts');
let device = new GoogleHomeAVT('192.168.2.34', 'en');
device.tts('Hello!', result => {
});
device.audio('http://domain.com/file.mp3', result => {
});
Configuration
Some options can be changed on any time:
device.setIp('192.168.2.123');
device.setLanguage('de');
device.setVolume(1);
device.setRestoreVolume(true);
device.setStreamType("BUFFERED");
device.setTtsTimeout(1000);
device.setTtsSpeed(1);
Limitations
-
This library explicit don't support MDNS!
Use fixed IP addresses for your devices.
MDNS causes problems on different systems. If there is really need to use MDNS, just add this before by yourself and pass the IP to this library.
-
TTS texts has a limit of 200 characters.
Bugs / Feature request
Please report bugs and feel free to ask for new features directly on GitHub.
License
Minoss is dual-licensed under MIT and GPL-2.0 license.
Donation
You like to support me?
You appreciate my work?
You use it in commercial projects?
Feel free to make a little donation! :wink: