# flite2

> binding for flite, a tiny text-to-speech synthesizer. This fork is compatible with flite 2.0

Latest version **0.0.6** (published 2018-03-14) · ISC license · 0 weekly downloads

## Install

```sh
npm install flite2
pnpm add flite2
yarn add flite2
bun add flite2
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2018-03-14 |
| First published | 2018-02-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 6.5 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | ianni67 |
| Maintainers | ianni67 |
| Keywords | flite, node.js, TTS |

## Links

- npm: https://www.npmjs.com/package/flite2
- Repository: https://github.com/ianni67/node-flite2
- Homepage: https://github.com/ianni67/node-flite2#readme
- Issues: https://github.com/ianni67/node-flite2/issues
- npm.io page: https://npm.io/package/flite2

## Dependencies (3)

- [fs](https://npm.io/package/fs.md) 0.0.1-security
- [temp](https://npm.io/package/temp.md) ^0.8.3
- [child_process](https://npm.io/package/child_process.md) ^1.0.2

## Recent versions

- 0.0.6 (latest) — 2018-03-14
- 0.0.5 — 2018-02-28
- 0.0.4 — 2018-02-27
- 0.0.3 — 2018-02-27
- 0.0.2 — 2018-02-27
- 0.0.1 — 2018-02-27

## README

# flite2
**npm binding for flite, a tiny text-to-speech synthesizer.**

node-flite2 is a fork from the original node-flite made to make it compatible with the current 2.0 version of flite. It also releases a control on the voices, that prevented it from using user-imported voices.

flite2 was developed to be used in combination with the iannitts package. 

(copyleft)ianni67 2018. Please share and enjoy.


## installation

    $ npm install flite2

also requires `flite 2.0.x` or `flite 1.4.x` ([www](http://www.speech.cs.cmu.edu/flite/)) and either `aplay`([www](http://alsa.opensrc.org/Aplay)) or `afplay` (default on OS X) to be installed and in your `$PATH`. Working on OSX and linux. Windows is currently untested and likely unsupported.

Flite is super tiny and fast and works great on ARM (eg, robots!), and has a variety of voices available (which are compiled into the binary - you probably want to build it yourself).

## example

    var flite = require('flite2')

    var message = "you know what we need? some more waffles!"

    flite(function (err, speech) {
      if (err) { return console.error(err) }
      speech.say(message, function (err) {
        if (err) { return console.error(err) }
        /// make sure to have your sound on :)
      });
    });

## usage

    var flite = require('flite2')
    flite([config], callback)

 - config object (optional)
 - callback: function (err, speech) - initializes and returns a speech object

config is an object with any of the following keys

 - voice: string - the name of a voice
 - ssml: boolean - treat input as [ssml](http://en.wikipedia.org/wiki/Speech_Synthesis_Markup_Language)


`speech.voices // array`

  array of valid voice names to use with the `voice` configuration setting.


`speech.config(configObj)`

  set configuration settings for this instance of `speech`

`speech.say(text, [fileout], callback)`

  speak the given input string `text`. if `fileout` is specified, the wavefile will be writen to that file and not to the speakers. if `fileout` is omitted, the wavefile will be played immediately. `callback` is invoked after the wavefile is written or the sound is done playing.

## license
Original license: MIT. (c) 2012 jden - Jason Denizac <jason@denizac.org>

My license: oh well... the same as before. 

For this version: (c)ianni67 2018

---
_Source: https://npm.io/package/flite2 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
