FEST

Gem Version Build Status Coverage Status License

Ruby wrapper use Festival for speak of the text and scripts ...

Requirements

Install

# Gemfile
gem 'fest'

or

$ gem install fest

Used

Call methods

require 'fest'

@fest = Fest.new
@fest.say("Пример")
# => Say "Пример"

@fest = Fest.new(YAML.load_file('../config/custom.yml'))
@fest.say("This is an example")
# => Say "This is an example"

# All options
# params || default value
params['path'] || "/tmp"
params['min_volume'] || 20
params['max_volume'] || 60
params['step'] || 4
params['backlight'] || nil # disable check backlight
params['language'] || "voice_msu_ru_nsh_clunits"

## Сustomization

@fest.initialize(params = {})
# check @current_volume
# @path, @index, @min_volume, @max_volume ...

@fest.check_conditions
# eval config/conditions.yml

@fest.make_wav(text)

@fest.expect_if_paplay_now
# wait if paplay active ...

@fest.play_wav
# @fest.check_optimal_volume (optimize min_volume and max_volume)
# @fest.turn_down_volume (with @step)
# @volume = @current_volume - @current_volume / 10 * @step
# play wav ... with @optimize_volume
# @fest.return_current_volume (with @step)
# delete_wav

Issues

Level of loudness doesn't dump after an exit

#!/bin/bash

vlc.run --play-and-exit $*
amixer set Master 30% > /dev/null 2>&1