speechmatics 0.1.3 → 0.1.4

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: d40d1b8c6efddddd53984cf64fc266d6c194fd32
4
- data.tar.gz: 4c60134501b6ced0c8b6e274df04fb9b0dd1ae91
3
+ metadata.gz: ea017673d556033401c14696044da5138ea16a07
4
+ data.tar.gz: 8d2130263ec30cd9c30176ca1aabc67ff7fe5c73
5
5
  SHA512:
6
- metadata.gz: c09203edb539d4ba440b3292b328264817a2b41e721d940524b99e871557ecd72c7fd4ae0a6b6b0f6859562279bcdc25426def34a2474bab72a8234041c97a9d
7
- data.tar.gz: d28f25754eb7f020f21cc7d41ed827456f9a3710c4afebda9a503f58b39743c92c09fea79cd9bddbc380f1025491b082679b96f7b8f26834f20e68adacdf2ca6
6
+ metadata.gz: 58542c658db617cf6170385b8b0a34a0af186f3dd46008b1d8c337df918709446eb27c356fa5b04eb9d525a361997e722091baaf574ad094dbbb7f7b78bd140c
7
+ data.tar.gz: 25bf87cc0aea2f8f330edbd2984726cba0942114dc842cfeb23c71186ee02870889719da8fb45f78cc6151d572c23464de9bd4476635f942b9bfb7765364186c
data/README.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # Speechmatics
2
2
 
3
- Speechmatics (https://speechmatics.com) provides an API for speech to text (https://speechmatics.com/api-details. This gem implements the API making it easier to integrate into Ruby and/or Rails projects.
3
+ [![Gem Version](https://badge.fury.io/rb/speechmatics.svg)](http://badge.fury.io/rb/speechmatics)
4
+ [![Build Status](https://travis-ci.org/PRX/speechmatics.svg?branch=master)](https://travis-ci.org/PRX/speechmatics)
5
+
6
+ Speechmatics (https://speechmatics.com) provides an API for speech to text (https://speechmatics.com/api-details).
7
+
8
+ This gem implements the API making it easier to integrate into Ruby and/or Rails projects.
4
9
 
5
10
  ## Installation
6
11
 
@@ -35,6 +40,10 @@ end
35
40
  # create a new client
36
41
  c = Speechmatics::Client.new
37
42
 
43
+ # create a new client, passing in Faraday parameters
44
+ # you can also pass in the same options as in `configure`
45
+ c = Speechmatics::Client.new(:request => { :timeout => 240 })
46
+
38
47
  # retrieve user
39
48
  j = c.user.get
40
49
 
@@ -64,13 +73,22 @@ trans = c.user.jobs.transcript(5678)
64
73
 
65
74
  ## Changes
66
75
 
76
+ * 0.1.3 - 6/10/2015
77
+ - Add default timeout of 120 seconds.
78
+
79
+ * 0.1.2 - 6/10/2015
80
+ - Yanked
81
+
82
+ * 0.1.1 - 3/26/2015
83
+ - Fix to work with Faraday 0.7.6
84
+
67
85
  * 0.1.0 - 10/24/2014
68
- Remove /user/$userid/jobs/$jobid/audio endpoint, no longer supported by speechmatics
86
+ - Remove /user/$userid/jobs/$jobid/audio endpoint, no longer supported by speechmatics
69
87
 
70
88
  * 0.0.2 - 8/7/2014
71
- Minor bug fix, treat integers/numbers as strings for params
72
- Use mimemagic to determine content type (no more libmagic dependency; this works on heroku)
73
- Switched the endpoint to use new 'https' requirement
89
+ - Minor bug fix, treat integers/numbers as strings for params
90
+ - Use mimemagic to determine content type (no more libmagic dependency; this works on heroku)
91
+ - Switched the endpoint to use new 'https' requirement
74
92
 
75
93
  ## Contributing
76
94
 
@@ -29,7 +29,7 @@ module Speechmatics
29
29
 
30
30
  content_type = params[:content_type] || MimeMagic.by_path(file_path).to_s
31
31
  raise "No content type specified for file, please provide a :content_type value" unless content_type
32
- raise "Content type for file '#{file_path}' is not audio, it is '#{content_type}'." unless (content_type =~ /audio/)
32
+ raise "Content type for file '#{file_path}' is not audio or video, it is '#{content_type}'." unless (content_type =~ /audio|video/)
33
33
 
34
34
  params[:data_file] = Faraday::UploadIO.new(file_path, content_type)
35
35
  params
@@ -1,5 +1,5 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
 
3
3
  module Speechmatics
4
- VERSION = '0.1.3'
4
+ VERSION = '0.1.4'
5
5
  end
@@ -93,12 +93,19 @@ describe Speechmatics::Client do
93
93
  jl.jobs.count.must_equal 2
94
94
  end
95
95
 
96
- it "creates job" do
96
+ it "creates job for an audio file" do
97
97
  r = jobs.create(data_file: File.expand_path(File.dirname(__FILE__) + '/../zero.wav'))
98
98
  r.id.must_equal 2
99
99
  r.cost.must_equal 0.50
100
100
  r.balance.must_equal 90
101
101
  end
102
+
103
+ it "creates job for a video file" do
104
+ r = jobs.create(data_file: File.expand_path(File.dirname(__FILE__) + '/../zero.mp4'))
105
+ r.id.must_equal 2
106
+ r.cost.must_equal 0.50
107
+ r.balance.must_equal 90
108
+ end
102
109
 
103
110
  it "gets transcript" do
104
111
  t = jobs.transcript(job_id: 1)
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: speechmatics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kuklewicz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-10 00:00:00.000000000 Z
11
+ date: 2015-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -193,6 +193,7 @@ files:
193
193
  - test/test_helper.rb
194
194
  - test/user/jobs_test.rb
195
195
  - test/user_test.rb
196
+ - test/zero.mp4
196
197
  - test/zero.wav
197
198
  homepage: ''
198
199
  licenses:
@@ -224,4 +225,5 @@ test_files:
224
225
  - test/test_helper.rb
225
226
  - test/user/jobs_test.rb
226
227
  - test/user_test.rb
228
+ - test/zero.mp4
227
229
  - test/zero.wav