transcribeme 1.0.0.alpha → 1.0.0.beta
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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/README.md +115 -15
- data/lib/transcribeme/api/client.rb +1 -1
- data/lib/transcribeme/version.rb +1 -1
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23b3a093592b85656762ec0032b8f3fa97ec6207
|
4
|
+
data.tar.gz: aa03e89273d1f655371f8b0010b7593aefead40a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f48989a92f98d16306b82277a31922184a86b38bd77524a119d5eff4af61b2fb0c0d43fb1a828043432241515557e3acd9598f40adf8c5877de154d94ac13354
|
7
|
+
data.tar.gz: 2c8dd584070feff6d3bccc6d9abf09a92d205ca7eb19bf26fe72cfc0feabdf9a66c4facf7557b4eb6de6345bcee8cc33fdccfc5da41f0e0d0e66b8e854483a26
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/README.md
CHANGED
@@ -36,7 +36,100 @@ Or install it yourself as:
|
|
36
36
|
|
37
37
|
## Usage
|
38
38
|
|
39
|
-
|
39
|
+
To get a file transcribed with this gem, this is the workflow:
|
40
|
+
|
41
|
+
- Sign in as a Customer
|
42
|
+
- Upload a file
|
43
|
+
- Submit for transcription (possibly with a Promocode)
|
44
|
+
|
45
|
+
|
46
|
+
#### Signing in
|
47
|
+
|
48
|
+
To create a new instance of the API client
|
49
|
+
|
50
|
+
client = TranscribeMe::API::Client.new
|
51
|
+
|
52
|
+
API Sessions have a lifetime of 1 hour. When we sign in as a user an API session will be created if it is either no longer valid or not yet initialized.
|
53
|
+
|
54
|
+
client.sign_in 'example@transcribeme.com', 'example'
|
55
|
+
|
56
|
+
GUIDs are prolific. Your session id is a GUID, and will be available in `client.session_id` but the result of signing in will return your Customer ID. Don't worry, you won't need this.
|
57
|
+
|
58
|
+
#### Getting a list of recordings
|
59
|
+
|
60
|
+
To get your recordings, call the `get_recordings` method:
|
61
|
+
|
62
|
+
recordings = client.get_recordings
|
63
|
+
|
64
|
+
This will return an array of hashes. These hashes have the following keys: `:date_created`, `:duration`, `:id`, `:name` and `:status`.
|
65
|
+
|
66
|
+
TODO: Status is currently slightly cryptic, and this will improve.
|
67
|
+
|
68
|
+
"10" # => Ready for transcription
|
69
|
+
"40" # => In Progress
|
70
|
+
"50" # => Complete
|
71
|
+
|
72
|
+
using `Array#select` you can filter for recordings that are in progress, complete or ready for transcription. This will be refactored post 1.0.0.
|
73
|
+
|
74
|
+
Array#select examples:
|
75
|
+
|
76
|
+
completed = recordings.select {|x| x[:status] == "50"}
|
77
|
+
in_progress = recordings.select {|x| x[:status] == "40"}
|
78
|
+
ready = recordings.select {|x| x[:status] == "10"}
|
79
|
+
|
80
|
+
#### Uploading recordings
|
81
|
+
|
82
|
+
###### Prerequisites
|
83
|
+
|
84
|
+
NOTE: This piece of functionality (and actually only this) relies on FFMPEG and the `streamio-ffmpeg` Ruby gem, unless you explicitly state the duration of the audio in an options hash.
|
85
|
+
|
86
|
+
On Ubuntu:
|
87
|
+
|
88
|
+
sudo apt-get install ffmpeg
|
89
|
+
|
90
|
+
(or your Linux package manager to install the ffmpeg package)
|
91
|
+
|
92
|
+
On Mac:
|
93
|
+
|
94
|
+
Get [Homebrew](http://brew.sh/) and then
|
95
|
+
|
96
|
+
brew install ffmpeg
|
97
|
+
|
98
|
+
|
99
|
+
Not yet tested on Windows environments. Feel free to send feedback / advice on an FFMPEG alternative.
|
100
|
+
|
101
|
+
|
102
|
+
RubyMotion - this gem uses synchronous connections, and other stuff making it inappropriate. A RubyMotion-specific gem is in the works.
|
103
|
+
|
104
|
+
###### Actually uploading files
|
105
|
+
|
106
|
+
client.upload 'my_cool_file.mp3'
|
107
|
+
|
108
|
+
That's pretty easy, right?
|
109
|
+
|
110
|
+
Or you can also include a second argument, to overwrite the defaults.
|
111
|
+
|
112
|
+
# options - a Hash with these keys:
|
113
|
+
# :multiple_speakers - Boolean (default is true)
|
114
|
+
# :duration - Float
|
115
|
+
# :description - String
|
116
|
+
|
117
|
+
client.upload 'my_cool_file.mp3', { duration: 12345.12, multiple_speakers: false, description: "Yo!" }
|
118
|
+
|
119
|
+
This can take some time, as it first uses [Excon](http://excon.io/) to upload to Windows Azure Blob Storage, using the URL asked provided by the API. Once the upload to Windows Azure completes, it sends a SOAP request to the API to confirm the file name and details. The recording is then in the initial state - Status 10, Ready for Transcription.
|
120
|
+
|
121
|
+
The return value is the response hash, which includes the Recording ID. This Recording ID is a GUID, and you may want to hold on to it. It will be available in the list of recordings.
|
122
|
+
|
123
|
+
#### Submitting recordings for transcription
|
124
|
+
|
125
|
+
If you have used the [web interface](https://portal.transcribeme.com) to set up payment you can use the transcribe_recording method like so:
|
126
|
+
|
127
|
+
client.transcribe_recording '5e38e162-3e05-4f4d-82c1-010a34891fd8'
|
128
|
+
|
129
|
+
or if you have a promo code:
|
130
|
+
|
131
|
+
client.transcribe_recording_using_promocode '5e38e162-3e05-4f4d-82c1-010a34891fd8', 'MyPromoCodeRules'
|
132
|
+
|
40
133
|
|
41
134
|
## Documentation
|
42
135
|
|
@@ -48,29 +141,36 @@ The documentation can be [browsed online](http://rubydoc.info/github/tuttinator/
|
|
48
141
|
|
49
142
|
Version 1.0.0 stable
|
50
143
|
|
51
|
-
- [
|
52
|
-
- [
|
53
|
-
- [
|
54
|
-
- [
|
55
|
-
- [
|
56
|
-
- [
|
57
|
-
- [
|
58
|
-
- [
|
59
|
-
- [
|
60
|
-
- [
|
61
|
-
- [
|
144
|
+
- [ ] Write specs
|
145
|
+
- [x] Set up Travis-CI and document supported Ruby versions
|
146
|
+
- [x] Investigate Windows Azure Blob storage file upload
|
147
|
+
- [x] Include Excon for Windows Azure Blob storage
|
148
|
+
- [x] Base64 decrypt transcription results
|
149
|
+
- [ ] Document SOAP calls and error messages
|
150
|
+
- [ ] Complete YARD documentation
|
151
|
+
- [ ] Include option (default)
|
152
|
+
- [ ] Validations for GUIDs
|
153
|
+
- [ ] Exceptions for error handling (about 50%)
|
154
|
+
- [ ] Modelling Recording objects, particularly better describing recording status
|
155
|
+
- [ ] Reduce gem size through reducing spec support files (download as needed during specs, gitignored?)
|
156
|
+
- [ ] Implement the customer sign up API
|
157
|
+
- [ ] Implement the customer reset password
|
62
158
|
|
63
159
|
Version 1.1.0
|
64
160
|
|
65
|
-
- [
|
161
|
+
- [ ] Refactor the recordings array into an object with `#completed` `#in_progress` and `#ready` instance methods
|
162
|
+
|
163
|
+
Version 1.2.0
|
164
|
+
|
165
|
+
- [ ] Create a CLI interface
|
66
166
|
|
67
167
|
RubyMotion
|
68
168
|
|
69
|
-
- [
|
169
|
+
- [ ] A RubyMotion fork (transcribeme-motion), wrapped in BubbleWrap's HTTP DSL (watch this space)
|
70
170
|
|
71
171
|
REST API Wrapper
|
72
172
|
|
73
|
-
- [
|
173
|
+
- [ ] A Sinatra RESTful wrapper around the SOAP operations for your own personal REST API middleman, with JSON-ic magic at your fingertips. JSON was always my favourite Argonaut.
|
74
174
|
|
75
175
|
## Contributing
|
76
176
|
|
@@ -163,7 +163,7 @@ module TranscribeMe
|
|
163
163
|
def transcribe_recording_using_promocode(recording_id, promocode)
|
164
164
|
# initialize_session unless @session.try :valid?
|
165
165
|
|
166
|
-
response = @savon.call :
|
166
|
+
response = @savon.call :transcribe_using_promo_code,
|
167
167
|
message: { 'wsdl:sessionID' => @session_id,
|
168
168
|
'wsdl:recordingId' => recording_id,
|
169
169
|
'wsdl:promoCode' => promocode }
|
data/lib/transcribeme/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: transcribeme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.beta
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tuttinator
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
/qqRTsuOOmPoaNtB4XnGMXyHOzOhAvurliPCtBFlkWAH0RvDt29O9ZcwRhInvr83
|
32
32
|
S4meqecZ62/XH48iGccggmMPiTi8zQ==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2013-09-
|
34
|
+
date: 2013-09-03 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: savon
|
metadata.gz.sig
CHANGED
Binary file
|