say is not working properly on windows x64
AutomataVM opened this issue · 2 comments
Hello! I installed say on my nodejs repo, but when I start up the web page I can't hear the voice. What could be the problem?????????????????
What web page?
Here's the code I have on the server side:
`// __ __ ___ ___
// |) / \ | |/ | |
// |__) __/ | | \ | |
// Import Botkit's core features
const { Botkit } = require('botkit');
const dialogflowMiddleware = require('botkit-middleware-dialogflow')({
keyFilename: './client-key.json',
});
const express = require('express');
const path = require('path');
const db = require('./config/db');
const say = require('say')
const { WebAdapter } = require('botbuilder-adapter-web');
const { MongoDbStorage } = require('botbuilder-storage-mongodb');
const adapter = new WebAdapter({});
const controller = new Botkit({
webhook_uri: '/api/messages',
adapter: adapter,
});
var client_id, convo_id;
controller.middleware.receive.use(dialogflowMiddleware.receive)
controller.ready(() => {
controller.loadModules(__dirname + '/features');
controller.publicFolder('/', path.join(__dirname,'public'));
controller.on(['hello','welcome_back'],async(bot,message)=>{
var salutation = '', hourOfDay = new Date().getHours();
if (hourOfDay < 14){
salutation += '¡Buenos dias!';
}
else{
if (hourOfDay > 14 && hourOfDay < 20){
salutation += '¡Buenas tardes!';
}
else{
salutation += '¡Buenas noches!';
}
}
await bot.reply(message, {type: 'typing'});
setTimeout(async () => {
await bot.changeContext(message.reference);
await bot.reply(message,'<div class="header"><img src ="images/ISA.gif" /><h4>'+salutation+' Soy ISA.</h4></div>');
await bot.reply(message, {type: 'typing'});
setTimeout(async () => {
await bot.changeContext(message.reference);
await bot.reply(message,'<div class="header"><img src ="images/ISA.gif" /><p>¿Me podrías dar tu nombre?</p></div>');
say.speak('Hola! Soy ISA');
say.stop();
}, 1000);
}, 800);
})`
I have earphones on, could that be the cause? I am working on nodejs