eyuvaraj's picture
Update routes/index.js
9cbdeca verified
raw
history blame
663 Bytes
var express = require('express');
var router = express.Router();
var textToSpeech = require('../helpers/tts');
/* POST /talk */
router.post('/talk', function(req, res, next) {
// Commenting out the function call for now
// textToSpeech(req.body.text, req.body.voice)
// .then(result => {
// res.json(result);
// })
// .catch(err => {
// res.json({});
// });
// Return a dummy string as output
res.json({ message: "Dummy response: text-to-speech is temporarily disabled." });
});
/* GET home page. */
router.get('/', function(req, res, next) {
res.render('index', { title: 'Express' });
});
module.exports = router;