noelportugal / google-home-notifier

Send notifications to Google Home
MIT License
579 stars 172 forks source link

How to choose the accent #36

Open thib5 opened 6 years ago

thib5 commented 6 years ago

Hi, I'm trying to send a notification in French with a Canadian accent but every time it's with a French accent ... I installed the google-its-api

this is my google-home-notifier.js


var Client = require('castv2-client').Client;
var DefaultMediaReceiver = require('castv2-client').DefaultMediaReceiver;
var mdns = require('mdns');
var browser = mdns.createBrowser(mdns.tcp('googlecast'));
var deviceAddress;
var language = 'fr-CA';

var device = function(name, lang = 'fr-CA') {
    device = name;
    language = lang;
    return this;
};

var ip = function(ip) {
  deviceAddress = ip;
  return this;
}

var googletts = require('google-tts-api');
var googlettsaccent = 'fr-CA';
var accent = function(accent) {
  googlettsaccent = accent;
  return this;
}
Silverbyrt commented 6 years ago

Hey, so i don't can help you sorry so i a few steps before this problem. I want to change the language to german but when i change the 'en' positions in the script to 'de' nothing change... and when i write in accent for 'us' maybe 'de' the programm says change it to 'us' or 'uk'... can you maybe help me :/.

Thank you and have a nice day

konradwalsh commented 6 years ago

i typed in en-US in both areas

rkdgusrnrlrl commented 6 years ago

i hope make method setDiviceLanguage is better. that dont affect before code and that will be solution to use just googlehome.ip('192.0.0.2') to set langauage

function setDiviceLanguage(lang) {
  language = lang
  googlettsaccent = lang
}