google-home-notifier で必要な部分のみを Promise でデコレートしたミニライブラリ
$ vagrant up
$ vagrant ssh
$ cd /vagrant
$ yarn add https://github.com/kuro-kuroite/mini-google-home-notifier.git
// import { GoogleHomeNotifier } from '@kuro-kuroite/mini-google-home-notifier';
const GoogleHomeNotifier = require("@kuro-kuroite/mini-google-home-notifier").GoogleHomeNotifier;
const options = {
language: 'ja',
};
// Pass the name or IP address of your device
const myHome = new GoogleHomeNotifier('192.168.10.151', options);
// myHome.speak('こんにちは');
myHome.push('http://www.ne.jp/asahi/music/myuu/wave/asibue.mp3');
Creates an instance
of GoogleHomeNotifier
Type: string
Accepts valid IP addresses or devise name.
Type: Object
Property | Type | Default | Description |
---|---|---|---|
language | string | en |
Default language that would be by the .speak() method |
timeout | number | 5000 |
Duration for device searching in miliseconds |
Type: string
Text that would be notified using the Google TTS
Type: string
Language that would be used to TTS the message.
If one is not passed, then it would fall back to one set in the options.
Pass the language
options from the following list.
Type: string
A valid media URL that would be cast