Status: BETA Crystal bindings for eSpeak NG (Next Generation) Text-to-Speech shared library.
- Add this to your application's shard.yml file
name: &YOUR_APP_NAME
version: &YOUR_APP_VERSION
dependencies:
espeak_ng:
github: medvedu/espeak_ng.cr
version: ~> 0.3.3
- install shard
$ cd &YOUR_APP_DIR
$ shards install
- and now you need to require the lib in your Crystal code:
require "espeak_ng"
$ sudo apt-get update
$ sudo apt-get install espeak-ng-espeak
Or via official manual: → github page
Note: linked against → 1.49.1 espeak-ng
See mbrola page.
ESpeakNG.say("Message sent!")
ESpeakNG.say("こんにちは", { speed: 70, lang: "japanese" } )
Or, via class instance:
bob = ESpeakNG.speaker({ speed: 44, volume: 35, pitch: 50, gap: 0})
bob.say "One. Two. Three. Four!"
With pre-installed mbrola and mbrola-voices-de1 packages it is possible to use third-party voices (f.e. German female voice used in example below):
Olga = ESpeakNG.speaker({ speed: 115, lang: "mb-de1" })
Olga.say "Hallo ich bin deutsches Mädchen!"
- tests
- add output to stdout | wav file
- Crystal 0.22.0
- eSpeak NG → github page
- mbrola 3.0.1h-5 (optional)
- Fork it ( https://github.com/Medvedu/espeak_ng.cr/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Released under the MIT License. See the → LICENSE file for further details.