tts 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cd79c3c482815e421adeb6aad75167eb9c598897
4
- data.tar.gz: 46d8424170b9a33b09c49cc5db7a7a8bec4ccbb2
3
+ metadata.gz: 1530e939b223c3b743f013ba42423450126d30a8
4
+ data.tar.gz: b81c2d8e4b90446d314bdc21e26f1789482f99ae
5
5
  SHA512:
6
- metadata.gz: 84869551f7719e52b408855d6a30176857476068b613498cc568bcf7428b586b156910beeb93fc1351a518ba062788cf69032d7a6409f99eb9d8d5927135ad6d
7
- data.tar.gz: 060090f14501bbb0dafb34a0667a720a2f44d12daf875a569e3c4f56691347a3d0db51299cad98ee61320dda0b2a70e3a7093a2dbd463a56238ba0de32d7af95
6
+ metadata.gz: 4dd0e163824977df01b76aba20caa94852211322237792963df8585ac693ad0e22c352595a167d106c2843810701de31b18f37e58427baa87ec50f5ff4b4c4f3
7
+ data.tar.gz: b3418c549a820f704497a8ee5f9fd8e66337e8554840950188f713fed26581bfb5c79cd3e2fee246f861b517efa73d93e565dd4fb9209c5ba05ff3659ac78e92
data/README.rdoc CHANGED
@@ -44,7 +44,8 @@ You need to install `mpg123`
44
44
  0.4 fixed issue that long text unable to generated.
45
45
  0.5 added all supported languages, added direct playback feature fixed some broken rspec.
46
46
  0.7 added CLI support
47
+ 0.7.1 fixed new google API
47
48
 
48
49
  == Copyright
49
50
 
50
- Copyright (c) 2011 Yiling Cao / Charlie Revett. Check LICENSE.txt
51
+ Copyright (c) 2011 Yiling Cao / and other supporters! Check LICENSE.txt
data/lib/tts.rb CHANGED
@@ -58,7 +58,7 @@ module Tts
58
58
  def to_url lang
59
59
  langs = ['af', 'ar', 'az', 'be', 'bg', 'bn', 'ca', 'cs', 'cy', 'da', 'de', 'el', 'en', 'en_us', 'en_gb', 'en_au', 'eo', 'es', 'et', 'eu', 'fa', 'fi', 'fr', 'ga', 'gl', 'gu', 'hi', 'hr', 'ht', 'hu', 'id', 'is', 'it', 'iw', 'ja', 'ka', 'kn', 'ko', 'la', 'lt', 'lv', 'mk', 'ms', 'mt', 'nl', 'no', 'pl', 'pt', 'ro', 'ru', 'sk', 'sl', 'sq', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tl', 'tr', 'uk', 'ur', 'vi', 'yi', 'zh', 'zh-CN', 'zh-TW']
60
60
  raise "Not accepted language, accpeted are #{langs * ","}" unless langs.include? lang
61
- base = "#{Tts.server_url}?tl=#{lang}&ie=UTF-8&client=t&q=#{URI.escape self}"
61
+ base = "#{Tts.server_url}?tl=#{lang}&ie=UTF-8&client=tw-ob&q=#{URI.escape self}"
62
62
  end
63
63
 
64
64
  def fetch_mp3 url, file_name
data/spec/tts_spec.rb CHANGED
@@ -33,11 +33,11 @@ end
33
33
 
34
34
  describe 'to_url method' do
35
35
  it "to_url should return a correct string" do
36
- "hello".to_url("en").should == "http://translate.google.com/translate_tts?tl=en&q=hello"
36
+ "hello".to_url("en").should == "http://translate.google.com/translate_tts?tl=en&ie=UTF-8&client=tw-ob&q=hello"
37
37
  end
38
38
 
39
39
  it "to_url should return a correct string with chinese char" do
40
- "人民广场".to_url("zh").should == "http://translate.google.com/translate_tts?tl=zh&q=%E4%BA%BA%E6%B0%91%E5%B9%BF%E5%9C%BA"
40
+ "人民广场".to_url("zh").should == "http://translate.google.com/translate_tts?tl=zh&ie=UTF-8&client=tw-ob&q=%E4%BA%BA%E6%B0%91%E5%B9%BF%E5%9C%BA"
41
41
  end
42
42
 
43
43
  end
@@ -90,6 +90,6 @@ describe 'set a server url' do
90
90
  end
91
91
 
92
92
  it "to_url should return a correct string" do
93
- "hello".to_url("en").should == "http://127.0.0.1:3001/translate_tts?tl=en&q=hello"
93
+ "hello".to_url("en").should == "http://127.0.0.1:3001/translate_tts?tl=en&ie=UTF-8&client=tw-ob&q=hello"
94
94
  end
95
95
  end
data/tts.gemspec CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "tts"
9
- s.version = "0.7.0"
9
+ s.version = "0.7.1"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yiling Cao