eyuvaraj commited on
Commit
9cbdeca
·
verified ·
1 Parent(s): 8187c33

Update routes/index.js

Browse files
Files changed (1) hide show
  1. routes/index.js +12 -10
routes/index.js CHANGED
@@ -2,21 +2,23 @@ var express = require('express');
2
  var router = express.Router();
3
  var textToSpeech = require('../helpers/tts');
4
 
5
- /* GET home page. */
6
  router.post('/talk', function(req, res, next) {
 
 
 
 
 
 
 
 
7
 
8
- textToSpeech(req.body.text, req.body.voice)
9
- .then(result => {
10
- res.json(result);
11
- })
12
- .catch(err => {
13
- res.json({});
14
- });
15
-
16
-
17
  });
18
 
19
 
 
20
  /* GET home page. */
21
  router.get('/', function(req, res, next) {
22
  res.render('index', { title: 'Express' });
 
2
  var router = express.Router();
3
  var textToSpeech = require('../helpers/tts');
4
 
5
+ /* POST /talk */
6
  router.post('/talk', function(req, res, next) {
7
+ // Commenting out the function call for now
8
+ // textToSpeech(req.body.text, req.body.voice)
9
+ // .then(result => {
10
+ // res.json(result);
11
+ // })
12
+ // .catch(err => {
13
+ // res.json({});
14
+ // });
15
 
16
+ // Return a dummy string as output
17
+ res.json({ message: "Dummy response: text-to-speech is temporarily disabled." });
 
 
 
 
 
 
 
18
  });
19
 
20
 
21
+
22
  /* GET home page. */
23
  router.get('/', function(req, res, next) {
24
  res.render('index', { title: 'Express' });