Skip to content
Text to speech translation. Supports next languages: english, turkey, ukrain, russian. Supports speaker, emotion, speech speed selection. Based on Yandex Speech Cloud.
Branch: master
Clone or download
Latest commit e700712 Jun 11, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
lib version 1.4 Jun 11, 2017
samples version 1.4 Jun 11, 2017
spec * removed outdated specs Jun 11, 2017
.gitignore version 1.4 Jun 11, 2017
.travis.yml
Gemfile version 1.4 Jun 11, 2017
Guardfile version 1.4 Jun 11, 2017
LICENSE
README.md
Rakefile
yandex_speech_api.gemspec

README.md

YandexSpeechApi Gem Version Build Status Code Climate Inline docs Coverage Status

Description

Converts English, Ukrain, Russian or Turkey text to speech. Solution based on Yandex SpeechKit Cloud technology.

About Key

Before usage you need to get an api key. Official site: https://developer.tech.yandex.ru (look for SpeechKit Cloud key)

Usage

  require 'yandex_speech'
  
  key = File.open('secret key/key').readline.strip
  
  speaker = YandexSpeechApi::Speaker.new key: key, language: 'russian'
  speaker.save_to_file 'Не будите спящего кота.'
  YandexSpeechApi.key = File.open('secret key/key').readline.strip
  
  message = "Don't trouble trouble until trouble troubles you"
  speaker = YandexSpeechApi::Speaker.new voice: :zahar, speed: 1.1
  speaker.say message
  key = File.open('secret key/key').readline.strip
  message = 'one two three. one two three. one two three four.'
  
  speaker = YandexSpeechApi::Speaker.new do |s|
    s.key      = key
    s.voice    = :jane
    s.language = :english
    s.emotion  = :good
  end
  
  speaker.say message

Notes

2000 symbols per request.

Dependencies

  • Ruby 2.0.0 or higher.
  • mpg123

License

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

You can’t perform that action at this time.