Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/paractmol/txt2speech
Convert text to speech using Google Translate API
https://github.com/paractmol/txt2speech
bing ruby speech
Last synced: 3 months ago
JSON representation
Convert text to speech using Google Translate API
- Host: GitHub
- URL: https://github.com/paractmol/txt2speech
- Owner: paractmol
- Created: 2014-12-12T18:23:22.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-08-01T20:43:55.000Z (over 7 years ago)
- Last Synced: 2024-10-31T14:19:37.575Z (3 months ago)
- Topics: bing, ruby, speech
- Language: Ruby
- Homepage:
- Size: 34.2 KB
- Stars: 38
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/rudkovskyi/txt2speech.svg?branch=master)](https://travis-ci.org/rudkovsky/txt2speech)
txt2speech is a very simple library that by using Google Translate undocumented API allow you convert text to speech.
```
bin/txt2speech -r README.md -f -o example.mpg
```### To use library directly in your application just install gem and run
```
2.1.2 :001 > require 'txt2speech'
=> true
2.1.2 :010 > f = Txt2Speech::Speech.new "Hello I am Google robot! Nice to meet you, hope you'll enjoy this script and will fork it"
=> #
2.1.2 :011 > f.save('out.mpg')
```or you can load a text file to read it
```
2.1.2 :006 > f = Txt2Speech::Speech.load "README.md"
=> # require './txt2speech.rb'\r\n => true\r\n2.1.2 :002 > f = Txt2Speech.new \"Hello I am google! Nice to meet you\"\r\n => #\r\n2.1.2 :003 > f.save(\"out.mpg\")\r\n => \"out.mpg\"\r\n```\r\n\r\nor you can load a text file to read it\r\n\r\n```\r\nt = Txt2Speech.load \"\#{Dir.home}/text.txt\"\r\nt.save(\"out.mpg\")\r\n```", @lang="en">
2.1.2 :007 > f.save("out.mpg")
```The differences between Google and Bing - [How Google and Bing protects their API](https://rudk.ws/2016/10/23/how-google-and-bing-protects-their-api/)