pollynomial 0.1.0 → 0.1.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 +4 -4
- data/README.md +5 -0
- data/exe/text2mp3 +32 -9
- data/lib/pollynomial/version.rb +1 -1
- data/pollynomial.gemspec +1 -0
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e74277511351d13cb151080ad4da18b94dfc82d0
|
4
|
+
data.tar.gz: 7a62018e89752e48e8bd67e83400af5ce09defaa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df75738695b1021c675f21f653af9611030d9d97e8bb27b0296e0bfc72bbf015d96f8ed9ab6cfb0aa457c92c593b5220d8aa84971cdf72a7c8e8e102dac01c94
|
7
|
+
data.tar.gz: 554859203e43d0fc8ce429767c575ed1afef222ddfc6bff36efedf853a1061dd4b7c904f933580ad18a63079ae921953d909c9d1276e7fb990a49380389ed664
|
data/README.md
CHANGED
data/exe/text2mp3
CHANGED
@@ -2,12 +2,35 @@
|
|
2
2
|
|
3
3
|
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
|
4
4
|
require 'pollynomial'
|
5
|
-
require '
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
5
|
+
require 'docopt'
|
6
|
+
require 'pry'
|
7
|
+
doc = <<DOCOPT
|
8
|
+
text2mp3 is convert your text into mp3 using AWS Polly.
|
9
|
+
It is assumed to set AWS credentials in environmental variables.
|
10
|
+
|
11
|
+
Usage:
|
12
|
+
#{__FILE__} -h | --help
|
13
|
+
#{__FILE__} [--voiceid=<voiceid>] [--region=<region>] [-o <outfile>] [-s <rate>] <path>
|
14
|
+
|
15
|
+
Options:
|
16
|
+
-h, --help Show this help
|
17
|
+
--voiceid=<voiceid> Voice ID of AWS Polly
|
18
|
+
-r, --region <region> AWS region name [dfault: us-east-1]
|
19
|
+
-o, --output <outfile> Output file name [default: tmp.mp3]
|
20
|
+
-s, --samplerate <rate> Sampling rate of output file [default: 16000]
|
21
|
+
|
22
|
+
DOCOPT
|
23
|
+
|
24
|
+
begin
|
25
|
+
params = Docopt::docopt(doc)
|
26
|
+
|
27
|
+
file_name= params["<path>"]
|
28
|
+
text = File.open(file_name).read
|
29
|
+
options = {voice_id: params["--voiceid"], region: params["--region"], sample_rate: params["--samplerate"]}
|
30
|
+
output = params["--output"]
|
31
|
+
synthesizer = Pollynomial::Synthesizer.new(options)
|
32
|
+
synthesizer.synthesize(text, file_name: output)
|
33
|
+
rescue Docopt::Exit => e
|
34
|
+
puts e.message
|
35
|
+
end
|
36
|
+
|
data/lib/pollynomial/version.rb
CHANGED
data/pollynomial.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pollynomial
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michiaki Ariga
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - '='
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 1.0.0.rc2
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: docopt
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 0.5.0
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 0.5.0
|
97
111
|
description: AWS polly wrapper, converts from text into speech audio.
|
98
112
|
email:
|
99
113
|
- chezou@gmail.com
|