Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mscdex/speaky
A binding to the SVOX Pico engine (libttspico) for performing text-to-speech
https://github.com/mscdex/speaky
Last synced: 3 months ago
JSON representation
A binding to the SVOX Pico engine (libttspico) for performing text-to-speech
- Host: GitHub
- URL: https://github.com/mscdex/speaky
- Owner: mscdex
- License: mit
- Created: 2016-03-19T15:56:22.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-03-19T16:32:10.000Z (almost 9 years ago)
- Last Synced: 2024-10-06T05:02:29.312Z (3 months ago)
- Language: C++
- Size: 6.84 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Description
===========A binding to the SVOX Pico engine (libttspico) for [node.js](http://nodejs.org/) for performing text-to-speech.
[![Build Status](https://travis-ci.org/mscdex/speaky.svg?branch=master)](https://travis-ci.org/mscdex/speaky)
Requirements
============* [node.js](http://nodejs.org/) -- v0.10.0 or newer
* libttspico* packages -- Tested on Ubuntu with version 1.0+git20130326-3Install
=======npm install speaky
Example
=======```javascript
var fs = require('fs');var Speaky = require('speaky');
// Use the en-US voice that comes with the libttspico-data package.
// The order of the 'ta' and 'sg' files does not matter, as long as both types
// are passed to the constructor.
// 'ta' === 'text analysis'
// 'sg' === 'signal generation'
// The path to these languages files may vary depending on your OS distro.
var speaky = new Speaky('/usr/share/pico/lang/en-US_ta.bin',
'/usr/share/pico/lang/en-US_lh0_sg.bin');speaky.speak('node j s rules!')
.pipe(fs.createWriteStream('out.pcm'));
speaky.speak('Help, I am trapped in a computer!')
.pipe(fs.createWriteStream('out2.pcm'));// Audio data is formatted as raw 16KHz, 16-bit signed integer PCM.
// The audio can be played via sox with:
// play -t raw -r 16000 -b 16 -c 1 -e signed-integer out.pcm
```API
===Speaky methods
--------------* **(constructor)**(< _String_ >taPath, < _String_ >sgPath) - Creates and returns a new Speaky instance that is set to use the voice described by the voice files at `taPath` and `sgPath`.
* **speak**(< _String_ >text) - _ReadableStream_ - Enqueues `text` to be synthesized to raw, 16KHz, 16-bit signed integer PCM audio samples. The Readable stream returned will receive this audio data as it is generated.