Skip to content

Crystal bindings for eSpeak NG (Next Generation) Text-to-Speech shared library.

License

Notifications You must be signed in to change notification settings

Medvedu/espeak_ng.cr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

espeak-ng-crystal

Status: BETA Crystal bindings for eSpeak NG (Next Generation) Text-to-Speech shared library.

Installation

Crystal installation

  1. 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
  1. install shard
  $ cd &YOUR_APP_DIR
  $ shards install
  1. and now you need to require the lib in your Crystal code:
  require "espeak_ng"

ESpeak shared-library installation

  $ 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

Custom voices installation (optional)

See mbrola page.

Usage

  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!"

TODO

  • tests
  • add output to stdout | wav file

Dependencies

Contributing

  • 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

License

Released under the MIT License. See the → LICENSE file for further details.

About

Crystal bindings for eSpeak NG (Next Generation) Text-to-Speech shared library.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published