Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

say is not working properly on windows x64 #96

Open
AutomataVM opened this issue Feb 18, 2020 · 2 comments
Open

say is not working properly on windows x64 #96

AutomataVM opened this issue Feb 18, 2020 · 2 comments

Comments

@AutomataVM
Copy link

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?????????????????

@tlhunter
Copy link
Collaborator

What web page?

@AutomataVM
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants