Text to Speech


eSpeak is a compact open source software speech synthesizer for English and other languages, for Linux and Windows.

Learn more about eSpeak here.

How To Connect

Cylon.robot({
  connections: {
    speech: { adaptor: 'speech' }
  },

  devices: {
    mouth: { driver: 'speech' }
  },

});

How To Use

var Cylon = require('cylon');

Cylon.robot({
  // voice for espeak can be specified either in one string or as params for the adaptor.
  // both connections below will reproduce with the same voice.
  // connections: { speech: { adaptor: 'speech', language: 'en, gender: 'f', 'voice: '3' } },
  connections: {
    speech: { adaptor: 'speech', voice: 'en-f3', speed: 130 }
  },

  devices: {
    mouth: { driver: 'speech' }
  },

  work: function(my) {
    my.mouth.say("This is awesome!");
    my.mouth.say("I'm a Cylon.JS robot, and I'm talking!");
  }
}).start();

Commands

say

Speaks the provided text

Params

  • text (String) text to say

  • callback (Function) function to be called when done

Returns

  • (undefined)

Compatibility