assemblyai 1.0.0.pre.beta.8 → 1.0.0.pre.beta.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/assemblyai/lemur/client.rb +34 -30
- data/lib/assemblyai/realtime/client.rb +4 -4
- data/lib/assemblyai/realtime/types/final_transcript.rb +2 -2
- data/lib/assemblyai/realtime/types/partial_transcript.rb +2 -2
- data/lib/assemblyai/realtime/types/session_begins.rb +2 -2
- data/lib/assemblyai/realtime/types/session_information.rb +2 -2
- data/lib/assemblyai/realtime/types/session_terminated.rb +2 -2
- data/lib/assemblyai/transcripts/types/entity_type.rb +15 -0
- data/lib/assemblyai/transcripts/types/page_details.rb +6 -6
- data/lib/assemblyai/transcripts/types/pii_policy.rb +35 -17
- data/lib/assemblyai/transcripts/types/sentiment_analysis_result.rb +1 -1
- data/lib/assemblyai/transcripts/types/transcript.rb +4 -4
- data/lib/assemblyai/transcripts/types/transcript_language_code.rb +84 -2
- data/lib/assemblyai/transcripts/types/transcript_optional_params.rb +18 -18
- data/lib/requests.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 267dae8c6c4c9cd73c6b547bb0aaf560f283a7f483437f5edddbfc8fc091edde
|
4
|
+
data.tar.gz: 6a8b1f420988acbce05a04d78e5114241a6fc5abef6c6ed0b3549979c868b9ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b25c9bc1531c0c97c5bef27c5067575afb3722d6aa826024e5e3d2b9cae03f24902a1787977436a3cd19cb9f1edcea51de42c656eb939b817b8e4aacb63c364e
|
7
|
+
data.tar.gz: edef4f4676465a37222e4c559b2179cfecd3a479c0181b3b947539fd1aef5e04d457b5ff7fd92fefb20d34ba57874ff34db87b9ca416c1faf0222501a5f56b16
|
@@ -44,11 +44,11 @@ module AssemblyAI
|
|
44
44
|
# @return [AssemblyAI::Lemur::LemurTaskResponse]
|
45
45
|
# @example
|
46
46
|
# api = AssemblyAI::Client.new(
|
47
|
-
# environment: Environment::DEFAULT,
|
47
|
+
# environment: AssemblyAI::Environment::DEFAULT,
|
48
48
|
# base_url: "https://api.example.com",
|
49
49
|
# api_key: "YOUR_API_KEY"
|
50
50
|
# )
|
51
|
-
# api.task(prompt: "List all the locations affected by wildfires.")
|
51
|
+
# api.lemur.task(prompt: "List all the locations affected by wildfires.")
|
52
52
|
def task(prompt:, transcript_ids: nil, input_text: nil, context: nil, final_model: nil, max_output_size: nil,
|
53
53
|
temperature: nil, request_options: nil)
|
54
54
|
response = @request_client.conn.post do |req|
|
@@ -71,8 +71,9 @@ module AssemblyAI
|
|
71
71
|
end
|
72
72
|
|
73
73
|
# Custom Summary allows you to distill a piece of audio into a few impactful
|
74
|
-
# sentences.
|
75
|
-
#
|
74
|
+
# sentences.
|
75
|
+
# You can give the model context to obtain more targeted results while outputting
|
76
|
+
# the results in a variety of formats described in human language.
|
76
77
|
#
|
77
78
|
# @param transcript_ids [Array<String>] A list of completed transcripts with text. Up to a maximum of 100 files or 100
|
78
79
|
# hours, whichever is lower.
|
@@ -94,11 +95,11 @@ module AssemblyAI
|
|
94
95
|
# @return [AssemblyAI::Lemur::LemurSummaryResponse]
|
95
96
|
# @example
|
96
97
|
# api = AssemblyAI::Client.new(
|
97
|
-
# environment: Environment::DEFAULT,
|
98
|
+
# environment: AssemblyAI::Environment::DEFAULT,
|
98
99
|
# base_url: "https://api.example.com",
|
99
100
|
# api_key: "YOUR_API_KEY"
|
100
101
|
# )
|
101
|
-
# api.summary
|
102
|
+
# api.lemur.summary
|
102
103
|
def summary(transcript_ids: nil, input_text: nil, context: nil, final_model: nil, max_output_size: nil,
|
103
104
|
temperature: nil, answer_format: nil, request_options: nil)
|
104
105
|
response = @request_client.conn.post do |req|
|
@@ -121,9 +122,10 @@ module AssemblyAI
|
|
121
122
|
end
|
122
123
|
|
123
124
|
# Question & Answer allows you to ask free-form questions about a single
|
124
|
-
# transcript or a group of transcripts.
|
125
|
-
#
|
126
|
-
# whether all items on a meeting's
|
125
|
+
# transcript or a group of transcripts.
|
126
|
+
# The questions can be any whose answers you find useful, such as judging whether
|
127
|
+
# a caller is likely to become a customer or whether all items on a meeting's
|
128
|
+
# agenda were covered.
|
127
129
|
#
|
128
130
|
# @param transcript_ids [Array<String>] A list of completed transcripts with text. Up to a maximum of 100 files or 100
|
129
131
|
# hours, whichever is lower.
|
@@ -148,11 +150,11 @@ module AssemblyAI
|
|
148
150
|
# @return [AssemblyAI::Lemur::LemurQuestionAnswerResponse]
|
149
151
|
# @example
|
150
152
|
# api = AssemblyAI::Client.new(
|
151
|
-
# environment: Environment::DEFAULT,
|
153
|
+
# environment: AssemblyAI::Environment::DEFAULT,
|
152
154
|
# base_url: "https://api.example.com",
|
153
155
|
# api_key: "YOUR_API_KEY"
|
154
156
|
# )
|
155
|
-
# api.question_answer(questions: [{ question: "Where are there wildfires?", answer_format: "List of countries in ISO 3166-1 alpha-2 format", answer_options: ["US", "CA"] }, { question: "Is global warming affecting wildfires?", answer_options: ["yes", "no"] }])
|
157
|
+
# api.lemur.question_answer(questions: [{ question: "Where are there wildfires?", answer_format: "List of countries in ISO 3166-1 alpha-2 format", answer_options: ["US", "CA"] }, { question: "Is global warming affecting wildfires?", answer_options: ["yes", "no"] }])
|
156
158
|
def question_answer(questions:, transcript_ids: nil, input_text: nil, context: nil, final_model: nil, max_output_size: nil,
|
157
159
|
temperature: nil, request_options: nil)
|
158
160
|
response = @request_client.conn.post do |req|
|
@@ -196,11 +198,11 @@ module AssemblyAI
|
|
196
198
|
# @return [AssemblyAI::Lemur::LemurActionItemsResponse]
|
197
199
|
# @example
|
198
200
|
# api = AssemblyAI::Client.new(
|
199
|
-
# environment: Environment::DEFAULT,
|
201
|
+
# environment: AssemblyAI::Environment::DEFAULT,
|
200
202
|
# base_url: "https://api.example.com",
|
201
203
|
# api_key: "YOUR_API_KEY"
|
202
204
|
# )
|
203
|
-
# api.action_items(answer_format: "Bullet Points")
|
205
|
+
# api.lemur.action_items(answer_format: "Bullet Points")
|
204
206
|
def action_items(transcript_ids: nil, input_text: nil, context: nil, final_model: nil, max_output_size: nil,
|
205
207
|
temperature: nil, answer_format: nil, request_options: nil)
|
206
208
|
response = @request_client.conn.post do |req|
|
@@ -232,11 +234,11 @@ module AssemblyAI
|
|
232
234
|
# @return [AssemblyAI::Lemur::PurgeLemurRequestDataResponse]
|
233
235
|
# @example
|
234
236
|
# api = AssemblyAI::Client.new(
|
235
|
-
# environment: Environment::DEFAULT,
|
237
|
+
# environment: AssemblyAI::Environment::DEFAULT,
|
236
238
|
# base_url: "https://api.example.com",
|
237
239
|
# api_key: "YOUR_API_KEY"
|
238
240
|
# )
|
239
|
-
# api.purge_request_data(request_id: "request_id")
|
241
|
+
# api.lemur.purge_request_data(request_id: "request_id")
|
240
242
|
def purge_request_data(request_id:, request_options: nil)
|
241
243
|
response = @request_client.conn.delete do |req|
|
242
244
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -280,11 +282,11 @@ module AssemblyAI
|
|
280
282
|
# @return [AssemblyAI::Lemur::LemurTaskResponse]
|
281
283
|
# @example
|
282
284
|
# api = AssemblyAI::Client.new(
|
283
|
-
# environment: Environment::DEFAULT,
|
285
|
+
# environment: AssemblyAI::Environment::DEFAULT,
|
284
286
|
# base_url: "https://api.example.com",
|
285
287
|
# api_key: "YOUR_API_KEY"
|
286
288
|
# )
|
287
|
-
# api.task(prompt: "List all the locations affected by wildfires.")
|
289
|
+
# api.lemur.task(prompt: "List all the locations affected by wildfires.")
|
288
290
|
def task(prompt:, transcript_ids: nil, input_text: nil, context: nil, final_model: nil, max_output_size: nil,
|
289
291
|
temperature: nil, request_options: nil)
|
290
292
|
Async do
|
@@ -309,8 +311,9 @@ module AssemblyAI
|
|
309
311
|
end
|
310
312
|
|
311
313
|
# Custom Summary allows you to distill a piece of audio into a few impactful
|
312
|
-
# sentences.
|
313
|
-
#
|
314
|
+
# sentences.
|
315
|
+
# You can give the model context to obtain more targeted results while outputting
|
316
|
+
# the results in a variety of formats described in human language.
|
314
317
|
#
|
315
318
|
# @param transcript_ids [Array<String>] A list of completed transcripts with text. Up to a maximum of 100 files or 100
|
316
319
|
# hours, whichever is lower.
|
@@ -332,11 +335,11 @@ module AssemblyAI
|
|
332
335
|
# @return [AssemblyAI::Lemur::LemurSummaryResponse]
|
333
336
|
# @example
|
334
337
|
# api = AssemblyAI::Client.new(
|
335
|
-
# environment: Environment::DEFAULT,
|
338
|
+
# environment: AssemblyAI::Environment::DEFAULT,
|
336
339
|
# base_url: "https://api.example.com",
|
337
340
|
# api_key: "YOUR_API_KEY"
|
338
341
|
# )
|
339
|
-
# api.summary
|
342
|
+
# api.lemur.summary
|
340
343
|
def summary(transcript_ids: nil, input_text: nil, context: nil, final_model: nil, max_output_size: nil,
|
341
344
|
temperature: nil, answer_format: nil, request_options: nil)
|
342
345
|
Async do
|
@@ -361,9 +364,10 @@ module AssemblyAI
|
|
361
364
|
end
|
362
365
|
|
363
366
|
# Question & Answer allows you to ask free-form questions about a single
|
364
|
-
# transcript or a group of transcripts.
|
365
|
-
#
|
366
|
-
# whether all items on a meeting's
|
367
|
+
# transcript or a group of transcripts.
|
368
|
+
# The questions can be any whose answers you find useful, such as judging whether
|
369
|
+
# a caller is likely to become a customer or whether all items on a meeting's
|
370
|
+
# agenda were covered.
|
367
371
|
#
|
368
372
|
# @param transcript_ids [Array<String>] A list of completed transcripts with text. Up to a maximum of 100 files or 100
|
369
373
|
# hours, whichever is lower.
|
@@ -388,11 +392,11 @@ module AssemblyAI
|
|
388
392
|
# @return [AssemblyAI::Lemur::LemurQuestionAnswerResponse]
|
389
393
|
# @example
|
390
394
|
# api = AssemblyAI::Client.new(
|
391
|
-
# environment: Environment::DEFAULT,
|
395
|
+
# environment: AssemblyAI::Environment::DEFAULT,
|
392
396
|
# base_url: "https://api.example.com",
|
393
397
|
# api_key: "YOUR_API_KEY"
|
394
398
|
# )
|
395
|
-
# api.question_answer(questions: [{ question: "Where are there wildfires?", answer_format: "List of countries in ISO 3166-1 alpha-2 format", answer_options: ["US", "CA"] }, { question: "Is global warming affecting wildfires?", answer_options: ["yes", "no"] }])
|
399
|
+
# api.lemur.question_answer(questions: [{ question: "Where are there wildfires?", answer_format: "List of countries in ISO 3166-1 alpha-2 format", answer_options: ["US", "CA"] }, { question: "Is global warming affecting wildfires?", answer_options: ["yes", "no"] }])
|
396
400
|
def question_answer(questions:, transcript_ids: nil, input_text: nil, context: nil, final_model: nil, max_output_size: nil,
|
397
401
|
temperature: nil, request_options: nil)
|
398
402
|
Async do
|
@@ -438,11 +442,11 @@ module AssemblyAI
|
|
438
442
|
# @return [AssemblyAI::Lemur::LemurActionItemsResponse]
|
439
443
|
# @example
|
440
444
|
# api = AssemblyAI::Client.new(
|
441
|
-
# environment: Environment::DEFAULT,
|
445
|
+
# environment: AssemblyAI::Environment::DEFAULT,
|
442
446
|
# base_url: "https://api.example.com",
|
443
447
|
# api_key: "YOUR_API_KEY"
|
444
448
|
# )
|
445
|
-
# api.action_items(answer_format: "Bullet Points")
|
449
|
+
# api.lemur.action_items(answer_format: "Bullet Points")
|
446
450
|
def action_items(transcript_ids: nil, input_text: nil, context: nil, final_model: nil, max_output_size: nil,
|
447
451
|
temperature: nil, answer_format: nil, request_options: nil)
|
448
452
|
Async do
|
@@ -476,11 +480,11 @@ module AssemblyAI
|
|
476
480
|
# @return [AssemblyAI::Lemur::PurgeLemurRequestDataResponse]
|
477
481
|
# @example
|
478
482
|
# api = AssemblyAI::Client.new(
|
479
|
-
# environment: Environment::DEFAULT,
|
483
|
+
# environment: AssemblyAI::Environment::DEFAULT,
|
480
484
|
# base_url: "https://api.example.com",
|
481
485
|
# api_key: "YOUR_API_KEY"
|
482
486
|
# )
|
483
|
-
# api.purge_request_data(request_id: "request_id")
|
487
|
+
# api.lemur.purge_request_data(request_id: "request_id")
|
484
488
|
def purge_request_data(request_id:, request_options: nil)
|
485
489
|
Async do
|
486
490
|
response = @request_client.conn.delete do |req|
|
@@ -22,11 +22,11 @@ module AssemblyAI
|
|
22
22
|
# @return [AssemblyAI::Realtime::RealtimeTemporaryTokenResponse]
|
23
23
|
# @example
|
24
24
|
# api = AssemblyAI::Client.new(
|
25
|
-
# environment: Environment::DEFAULT,
|
25
|
+
# environment: AssemblyAI::Environment::DEFAULT,
|
26
26
|
# base_url: "https://api.example.com",
|
27
27
|
# api_key: "YOUR_API_KEY"
|
28
28
|
# )
|
29
|
-
# api.create_temporary_token(expires_in: 480)
|
29
|
+
# api.realtime.create_temporary_token(expires_in: 480)
|
30
30
|
def create_temporary_token(expires_in:, request_options: nil)
|
31
31
|
response = @request_client.conn.post do |req|
|
32
32
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -56,11 +56,11 @@ module AssemblyAI
|
|
56
56
|
# @return [AssemblyAI::Realtime::RealtimeTemporaryTokenResponse]
|
57
57
|
# @example
|
58
58
|
# api = AssemblyAI::Client.new(
|
59
|
-
# environment: Environment::DEFAULT,
|
59
|
+
# environment: AssemblyAI::Environment::DEFAULT,
|
60
60
|
# base_url: "https://api.example.com",
|
61
61
|
# api_key: "YOUR_API_KEY"
|
62
62
|
# )
|
63
|
-
# api.create_temporary_token(expires_in: 480)
|
63
|
+
# api.realtime.create_temporary_token(expires_in: 480)
|
64
64
|
def create_temporary_token(expires_in:, request_options: nil)
|
65
65
|
Async do
|
66
66
|
response = @request_client.conn.post do |req|
|
@@ -8,7 +8,7 @@ require "json"
|
|
8
8
|
module AssemblyAI
|
9
9
|
class Realtime
|
10
10
|
class FinalTranscript
|
11
|
-
# @return [String]
|
11
|
+
# @return [String] Describes the type of message
|
12
12
|
attr_reader :message_type
|
13
13
|
# @return [Boolean] Whether the text is punctuated and cased
|
14
14
|
attr_reader :punctuated
|
@@ -37,7 +37,7 @@ module AssemblyAI
|
|
37
37
|
|
38
38
|
OMIT = Object.new
|
39
39
|
|
40
|
-
# @param message_type [String]
|
40
|
+
# @param message_type [String] Describes the type of message
|
41
41
|
# @param punctuated [Boolean] Whether the text is punctuated and cased
|
42
42
|
# @param text_formatted [Boolean] Whether the text is formatted, for example Dollar -> $
|
43
43
|
# @param audio_start [Integer] Start time of audio sample relative to session start, in milliseconds
|
@@ -8,7 +8,7 @@ require "json"
|
|
8
8
|
module AssemblyAI
|
9
9
|
class Realtime
|
10
10
|
class PartialTranscript
|
11
|
-
# @return [String]
|
11
|
+
# @return [String] Describes the type of message
|
12
12
|
attr_reader :message_type
|
13
13
|
# @return [Integer] Start time of audio sample relative to session start, in milliseconds
|
14
14
|
attr_reader :audio_start
|
@@ -33,7 +33,7 @@ module AssemblyAI
|
|
33
33
|
|
34
34
|
OMIT = Object.new
|
35
35
|
|
36
|
-
# @param message_type [String]
|
36
|
+
# @param message_type [String] Describes the type of message
|
37
37
|
# @param audio_start [Integer] Start time of audio sample relative to session start, in milliseconds
|
38
38
|
# @param audio_end [Integer] End time of audio sample relative to session start, in milliseconds
|
39
39
|
# @param confidence [Float] The confidence score of the entire transcription, between 0 and 1
|
@@ -7,7 +7,7 @@ require "json"
|
|
7
7
|
module AssemblyAI
|
8
8
|
class Realtime
|
9
9
|
class SessionBegins
|
10
|
-
# @return [String]
|
10
|
+
# @return [String] Describes the type of the message
|
11
11
|
attr_reader :message_type
|
12
12
|
# @return [String] Unique identifier for the established session
|
13
13
|
attr_reader :session_id
|
@@ -21,7 +21,7 @@ module AssemblyAI
|
|
21
21
|
|
22
22
|
OMIT = Object.new
|
23
23
|
|
24
|
-
# @param message_type [String]
|
24
|
+
# @param message_type [String] Describes the type of the message
|
25
25
|
# @param session_id [String] Unique identifier for the established session
|
26
26
|
# @param expires_at [DateTime] Timestamp when this session will expire
|
27
27
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
@@ -9,7 +9,7 @@ module AssemblyAI
|
|
9
9
|
# This message is sent at the end of the session, before the SessionTerminated
|
10
10
|
# message.
|
11
11
|
class SessionInformation
|
12
|
-
# @return [String]
|
12
|
+
# @return [String] Describes the type of the message
|
13
13
|
attr_reader :message_type
|
14
14
|
# @return [Float] The total duration of the audio in seconds
|
15
15
|
attr_reader :audio_duration_seconds
|
@@ -21,7 +21,7 @@ module AssemblyAI
|
|
21
21
|
|
22
22
|
OMIT = Object.new
|
23
23
|
|
24
|
-
# @param message_type [String]
|
24
|
+
# @param message_type [String] Describes the type of the message
|
25
25
|
# @param audio_duration_seconds [Float] The total duration of the audio in seconds
|
26
26
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
27
27
|
# @return [AssemblyAI::Realtime::SessionInformation]
|
@@ -6,7 +6,7 @@ require "json"
|
|
6
6
|
module AssemblyAI
|
7
7
|
class Realtime
|
8
8
|
class SessionTerminated
|
9
|
-
# @return [String]
|
9
|
+
# @return [String] Describes the type of the message
|
10
10
|
attr_reader :message_type
|
11
11
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
12
12
|
attr_reader :additional_properties
|
@@ -16,7 +16,7 @@ module AssemblyAI
|
|
16
16
|
|
17
17
|
OMIT = Object.new
|
18
18
|
|
19
|
-
# @param message_type [String]
|
19
|
+
# @param message_type [String] Describes the type of the message
|
20
20
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
21
21
|
# @return [AssemblyAI::Realtime::SessionTerminated]
|
22
22
|
def initialize(message_type:, additional_properties: nil)
|
@@ -4,35 +4,50 @@ module AssemblyAI
|
|
4
4
|
class Transcripts
|
5
5
|
# The type of entity for the detected entity
|
6
6
|
class EntityType
|
7
|
+
ACCOUNT_NUMBER = "account_number"
|
7
8
|
BANKING_INFORMATION = "banking_information"
|
8
9
|
BLOOD_TYPE = "blood_type"
|
9
10
|
CREDIT_CARD_CVV = "credit_card_cvv"
|
10
11
|
CREDIT_CARD_EXPIRATION = "credit_card_expiration"
|
11
12
|
CREDIT_CARD_NUMBER = "credit_card_number"
|
12
13
|
DATE = "date"
|
14
|
+
DATE_INTERVAL = "date_interval"
|
13
15
|
DATE_OF_BIRTH = "date_of_birth"
|
14
16
|
DRIVERS_LICENSE = "drivers_license"
|
15
17
|
DRUG = "drug"
|
18
|
+
DURATION = "duration"
|
16
19
|
EMAIL_ADDRESS = "email_address"
|
17
20
|
EVENT = "event"
|
21
|
+
FILENAME = "filename"
|
22
|
+
GENDER_SEXUALITY = "gender_sexuality"
|
23
|
+
HEALTHCARE_NUMBER = "healthcare_number"
|
18
24
|
INJURY = "injury"
|
25
|
+
IP_ADDRESS = "ip_address"
|
19
26
|
LANGUAGE = "language"
|
20
27
|
LOCATION = "location"
|
28
|
+
MARITAL_STATUS = "marital_status"
|
21
29
|
MEDICAL_CONDITION = "medical_condition"
|
22
30
|
MEDICAL_PROCESS = "medical_process"
|
23
31
|
MONEY_AMOUNT = "money_amount"
|
24
32
|
NATIONALITY = "nationality"
|
33
|
+
NUMBER_SEQUENCE = "number_sequence"
|
25
34
|
OCCUPATION = "occupation"
|
26
35
|
ORGANIZATION = "organization"
|
36
|
+
PASSPORT_NUMBER = "passport_number"
|
27
37
|
PASSWORD = "password"
|
28
38
|
PERSON_AGE = "person_age"
|
29
39
|
PERSON_NAME = "person_name"
|
30
40
|
PHONE_NUMBER = "phone_number"
|
41
|
+
PHYSICAL_ATTRIBUTE = "physical_attribute"
|
31
42
|
POLITICAL_AFFILIATION = "political_affiliation"
|
32
43
|
RELIGION = "religion"
|
44
|
+
STATISTICS = "statistics"
|
33
45
|
TIME = "time"
|
34
46
|
URL = "url"
|
35
47
|
US_SOCIAL_SECURITY_NUMBER = "us_social_security_number"
|
48
|
+
USERNAME = "username"
|
49
|
+
VEHICLE_ID = "vehicle_id"
|
50
|
+
ZODIAC_SIGN = "zodiac_sign"
|
36
51
|
end
|
37
52
|
end
|
38
53
|
end
|
@@ -8,11 +8,11 @@ module AssemblyAI
|
|
8
8
|
# Details of the transcript page. Transcripts are sorted from newest to oldest.
|
9
9
|
# The previous URL always points to a page with older transcripts.
|
10
10
|
class PageDetails
|
11
|
-
# @return [Integer]
|
11
|
+
# @return [Integer] The number of results this page is limited to
|
12
12
|
attr_reader :limit
|
13
|
-
# @return [Integer]
|
13
|
+
# @return [Integer] The actual number of results in the page
|
14
14
|
attr_reader :result_count
|
15
|
-
# @return [String]
|
15
|
+
# @return [String] The URL used to retrieve the current page of transcripts
|
16
16
|
attr_reader :current_url
|
17
17
|
# @return [String] The URL to the next page of transcripts. The previous URL always points to a
|
18
18
|
# page with older transcripts.
|
@@ -28,9 +28,9 @@ module AssemblyAI
|
|
28
28
|
|
29
29
|
OMIT = Object.new
|
30
30
|
|
31
|
-
# @param limit [Integer]
|
32
|
-
# @param result_count [Integer]
|
33
|
-
# @param current_url [String]
|
31
|
+
# @param limit [Integer] The number of results this page is limited to
|
32
|
+
# @param result_count [Integer] The actual number of results in the page
|
33
|
+
# @param current_url [String] The URL used to retrieve the current page of transcripts
|
34
34
|
# @param prev_url [String] The URL to the next page of transcripts. The previous URL always points to a
|
35
35
|
# page with older transcripts.
|
36
36
|
# @param next_url [String] The URL to the next page of transcripts. The next URL always points to a page
|
@@ -2,34 +2,52 @@
|
|
2
2
|
|
3
3
|
module AssemblyAI
|
4
4
|
class Transcripts
|
5
|
+
# The type of PII to redact
|
5
6
|
class PiiPolicy
|
6
|
-
|
7
|
-
|
7
|
+
ACCOUNT_NUMBER = "account_number"
|
8
|
+
BANKING_INFORMATION = "banking_information"
|
8
9
|
BLOOD_TYPE = "blood_type"
|
9
|
-
DRUG = "drug"
|
10
|
-
INJURY = "injury"
|
11
|
-
NUMBER_SEQUENCE = "number_sequence"
|
12
|
-
EMAIL_ADDRESS = "email_address"
|
13
|
-
DATE_OF_BIRTH = "date_of_birth"
|
14
|
-
PHONE_NUMBER = "phone_number"
|
15
|
-
US_SOCIAL_SECURITY_NUMBER = "us_social_security_number"
|
16
|
-
CREDIT_CARD_NUMBER = "credit_card_number"
|
17
|
-
CREDIT_CARD_EXPIRATION = "credit_card_expiration"
|
18
10
|
CREDIT_CARD_CVV = "credit_card_cvv"
|
11
|
+
CREDIT_CARD_EXPIRATION = "credit_card_expiration"
|
12
|
+
CREDIT_CARD_NUMBER = "credit_card_number"
|
19
13
|
DATE = "date"
|
20
|
-
|
14
|
+
DATE_INTERVAL = "date_interval"
|
15
|
+
DATE_OF_BIRTH = "date_of_birth"
|
16
|
+
DRIVERS_LICENSE = "drivers_license"
|
17
|
+
DRUG = "drug"
|
18
|
+
DURATION = "duration"
|
19
|
+
EMAIL_ADDRESS = "email_address"
|
21
20
|
EVENT = "event"
|
21
|
+
FILENAME = "filename"
|
22
|
+
GENDER_SEXUALITY = "gender_sexuality"
|
23
|
+
HEALTHCARE_NUMBER = "healthcare_number"
|
24
|
+
INJURY = "injury"
|
25
|
+
IP_ADDRESS = "ip_address"
|
22
26
|
LANGUAGE = "language"
|
23
27
|
LOCATION = "location"
|
28
|
+
MARITAL_STATUS = "marital_status"
|
29
|
+
MEDICAL_CONDITION = "medical_condition"
|
30
|
+
MEDICAL_PROCESS = "medical_process"
|
24
31
|
MONEY_AMOUNT = "money_amount"
|
25
|
-
|
26
|
-
|
32
|
+
NATIONALITY = "nationality"
|
33
|
+
NUMBER_SEQUENCE = "number_sequence"
|
34
|
+
OCCUPATION = "occupation"
|
27
35
|
ORGANIZATION = "organization"
|
36
|
+
PASSPORT_NUMBER = "passport_number"
|
37
|
+
PASSWORD = "password"
|
38
|
+
PERSON_AGE = "person_age"
|
39
|
+
PERSON_NAME = "person_name"
|
40
|
+
PHONE_NUMBER = "phone_number"
|
41
|
+
PHYSICAL_ATTRIBUTE = "physical_attribute"
|
28
42
|
POLITICAL_AFFILIATION = "political_affiliation"
|
29
|
-
OCCUPATION = "occupation"
|
30
43
|
RELIGION = "religion"
|
31
|
-
|
32
|
-
|
44
|
+
STATISTICS = "statistics"
|
45
|
+
TIME = "time"
|
46
|
+
URL = "url"
|
47
|
+
US_SOCIAL_SECURITY_NUMBER = "us_social_security_number"
|
48
|
+
USERNAME = "username"
|
49
|
+
VEHICLE_ID = "vehicle_id"
|
50
|
+
ZODIAC_SIGN = "zodiac_sign"
|
33
51
|
end
|
34
52
|
end
|
35
53
|
end
|
@@ -67,7 +67,7 @@ module AssemblyAI
|
|
67
67
|
attr_reader :dual_channel
|
68
68
|
# @return [AssemblyAI::Transcripts::SpeechModel]
|
69
69
|
attr_reader :speech_model
|
70
|
-
# @return [String] The URL to which we send webhooks upon
|
70
|
+
# @return [String] The URL to which we send webhooks upon transcription completion
|
71
71
|
attr_reader :webhook_url
|
72
72
|
# @return [Integer] The status code we received from your server when delivering your webhook, if a
|
73
73
|
# webhook URL was provided
|
@@ -172,7 +172,7 @@ module AssemblyAI
|
|
172
172
|
attr_reader :sentiment_analysis
|
173
173
|
# @return [Array<AssemblyAI::Transcripts::SentimentAnalysisResult>] An array of results for the Sentiment Analysis model, if it is enabled.
|
174
174
|
# See [Sentiment
|
175
|
-
#
|
175
|
+
# Analysis](https://www.assemblyai.com/docs/models/sentiment-analysis) for more
|
176
176
|
# information.
|
177
177
|
attr_reader :sentiment_analysis_results
|
178
178
|
# @return [Boolean] Whether [Entity
|
@@ -230,7 +230,7 @@ module AssemblyAI
|
|
230
230
|
# ://www.assemblyai.com/docs/models/speech-recognition#dual-channel-transcription)
|
231
231
|
# was enabled in the transcription request, either true or false
|
232
232
|
# @param speech_model [AssemblyAI::Transcripts::SpeechModel]
|
233
|
-
# @param webhook_url [String] The URL to which we send webhooks upon
|
233
|
+
# @param webhook_url [String] The URL to which we send webhooks upon transcription completion
|
234
234
|
# @param webhook_status_code [Integer] The status code we received from your server when delivering your webhook, if a
|
235
235
|
# webhook URL was provided
|
236
236
|
# @param webhook_auth [Boolean] Whether webhook authentication details were provided
|
@@ -300,7 +300,7 @@ module AssemblyAI
|
|
300
300
|
# can be true or false
|
301
301
|
# @param sentiment_analysis_results [Array<AssemblyAI::Transcripts::SentimentAnalysisResult>] An array of results for the Sentiment Analysis model, if it is enabled.
|
302
302
|
# See [Sentiment
|
303
|
-
#
|
303
|
+
# Analysis](https://www.assemblyai.com/docs/models/sentiment-analysis) for more
|
304
304
|
# information.
|
305
305
|
# @param entity_detection [Boolean] Whether [Entity
|
306
306
|
# Detection](https://www.assemblyai.com/docs/models/entity-detection) is enabled,
|
@@ -16,16 +16,98 @@ module AssemblyAI
|
|
16
16
|
IT = "it"
|
17
17
|
PT = "pt"
|
18
18
|
NL = "nl"
|
19
|
-
|
20
|
-
|
19
|
+
AF = "af"
|
20
|
+
SQ = "sq"
|
21
|
+
AM = "am"
|
22
|
+
AR = "ar"
|
23
|
+
HY = "hy"
|
24
|
+
AS = "as"
|
25
|
+
AZ = "az"
|
26
|
+
BA = "ba"
|
27
|
+
EU = "eu"
|
28
|
+
BE = "be"
|
29
|
+
BN = "bn"
|
30
|
+
BS = "bs"
|
31
|
+
BR = "br"
|
32
|
+
BG = "bg"
|
33
|
+
MY = "my"
|
34
|
+
CA = "ca"
|
21
35
|
ZH = "zh"
|
36
|
+
HR = "hr"
|
37
|
+
CS = "cs"
|
38
|
+
DA = "da"
|
39
|
+
ET = "et"
|
40
|
+
FO = "fo"
|
22
41
|
FI = "fi"
|
42
|
+
GL = "gl"
|
43
|
+
KA = "ka"
|
44
|
+
EL = "el"
|
45
|
+
GU = "gu"
|
46
|
+
HT = "ht"
|
47
|
+
HA = "ha"
|
48
|
+
HAW = "haw"
|
49
|
+
HE = "he"
|
50
|
+
HI = "hi"
|
51
|
+
HU = "hu"
|
52
|
+
IS = "is"
|
53
|
+
ID = "id"
|
54
|
+
JA = "ja"
|
55
|
+
JW = "jw"
|
56
|
+
KN = "kn"
|
57
|
+
KK = "kk"
|
58
|
+
KM = "km"
|
23
59
|
KO = "ko"
|
60
|
+
LO = "lo"
|
61
|
+
LA = "la"
|
62
|
+
LV = "lv"
|
63
|
+
LN = "ln"
|
64
|
+
LT = "lt"
|
65
|
+
LB = "lb"
|
66
|
+
MK = "mk"
|
67
|
+
MG = "mg"
|
68
|
+
MS = "ms"
|
69
|
+
ML = "ml"
|
70
|
+
MT = "mt"
|
71
|
+
MI = "mi"
|
72
|
+
MR = "mr"
|
73
|
+
MN = "mn"
|
74
|
+
NE = "ne"
|
75
|
+
NO = "no"
|
76
|
+
NN = "nn"
|
77
|
+
OC = "oc"
|
78
|
+
PA = "pa"
|
79
|
+
PS = "ps"
|
80
|
+
FA = "fa"
|
24
81
|
PL = "pl"
|
82
|
+
RO = "ro"
|
25
83
|
RU = "ru"
|
84
|
+
SA = "sa"
|
85
|
+
SR = "sr"
|
86
|
+
SN = "sn"
|
87
|
+
SD = "sd"
|
88
|
+
SI = "si"
|
89
|
+
SK = "sk"
|
90
|
+
SL = "sl"
|
91
|
+
SO = "so"
|
92
|
+
SU = "su"
|
93
|
+
SW = "sw"
|
94
|
+
SV = "sv"
|
95
|
+
TL = "tl"
|
96
|
+
TG = "tg"
|
97
|
+
TA = "ta"
|
98
|
+
TT = "tt"
|
99
|
+
TE = "te"
|
100
|
+
TH = "th"
|
101
|
+
BO = "bo"
|
26
102
|
TR = "tr"
|
103
|
+
TK = "tk"
|
27
104
|
UK = "uk"
|
105
|
+
UR = "ur"
|
106
|
+
UZ = "uz"
|
28
107
|
VI = "vi"
|
108
|
+
CY = "cy"
|
109
|
+
YI = "yi"
|
110
|
+
YO = "yo"
|
29
111
|
end
|
30
112
|
end
|
31
113
|
end
|
@@ -28,14 +28,14 @@ module AssemblyAI
|
|
28
28
|
attr_reader :dual_channel
|
29
29
|
# @return [AssemblyAI::Transcripts::SpeechModel]
|
30
30
|
attr_reader :speech_model
|
31
|
-
# @return [String] The URL to which AssemblyAI send webhooks upon
|
31
|
+
# @return [String] The URL to which AssemblyAI send webhooks upon transcription completion
|
32
32
|
attr_reader :webhook_url
|
33
33
|
# @return [String] The header name which should be sent back with webhook calls
|
34
34
|
attr_reader :webhook_auth_header_name
|
35
35
|
# @return [String] Specify a header name and value to send back with a webhook call for added
|
36
36
|
# security
|
37
37
|
attr_reader :webhook_auth_header_value
|
38
|
-
# @return [Boolean]
|
38
|
+
# @return [Boolean] Enable Key Phrases, either true or false
|
39
39
|
attr_reader :auto_highlights
|
40
40
|
# @return [Integer] The point in time, in milliseconds, to begin transcribing in your media file
|
41
41
|
attr_reader :audio_start_from
|
@@ -79,16 +79,16 @@ module AssemblyAI
|
|
79
79
|
# Moderation](https://www.assemblyai.com/docs/models/content-moderation), can be
|
80
80
|
# true or false
|
81
81
|
attr_reader :content_safety
|
82
|
-
# @return [Integer] The confidence threshold for
|
83
|
-
# 100.
|
82
|
+
# @return [Integer] The confidence threshold for the Content Moderation model. Values must be
|
83
|
+
# between 25 and 100.
|
84
84
|
attr_reader :content_safety_confidence
|
85
85
|
# @return [Boolean] Enable [Topic
|
86
86
|
# Detection](https://www.assemblyai.com/docs/models/topic-detection), can be true
|
87
87
|
# or false
|
88
88
|
attr_reader :iab_categories
|
89
|
-
# @return [Boolean]
|
90
|
-
#
|
91
|
-
#
|
89
|
+
# @return [Boolean] Enable [Automatic language
|
90
|
+
# www.assemblyai.com/docs/models/speech-recognition#automatic-language-detection),
|
91
|
+
# either true or false.
|
92
92
|
attr_reader :language_detection
|
93
93
|
# @return [Array<AssemblyAI::Transcripts::TranscriptCustomSpelling>] Customize how words are spelled and formatted using to and from values
|
94
94
|
attr_reader :custom_spelling
|
@@ -115,9 +115,9 @@ module AssemblyAI
|
|
115
115
|
attr_reader :summary_model
|
116
116
|
# @return [AssemblyAI::Transcripts::SummaryType] The type of summary
|
117
117
|
attr_reader :summary_type
|
118
|
-
# @return [Boolean]
|
118
|
+
# @return [Boolean] Enable custom topics, either true or false
|
119
119
|
attr_reader :custom_topics
|
120
|
-
# @return [Array<String>] The list of custom topics
|
120
|
+
# @return [Array<String>] The list of custom topics
|
121
121
|
attr_reader :topics
|
122
122
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
123
123
|
attr_reader :additional_properties
|
@@ -134,11 +134,11 @@ module AssemblyAI
|
|
134
134
|
# ://www.assemblyai.com/docs/models/speech-recognition#dual-channel-transcription)
|
135
135
|
# transcription, can be true or false.
|
136
136
|
# @param speech_model [AssemblyAI::Transcripts::SpeechModel]
|
137
|
-
# @param webhook_url [String] The URL to which AssemblyAI send webhooks upon
|
137
|
+
# @param webhook_url [String] The URL to which AssemblyAI send webhooks upon transcription completion
|
138
138
|
# @param webhook_auth_header_name [String] The header name which should be sent back with webhook calls
|
139
139
|
# @param webhook_auth_header_value [String] Specify a header name and value to send back with a webhook call for added
|
140
140
|
# security
|
141
|
-
# @param auto_highlights [Boolean]
|
141
|
+
# @param auto_highlights [Boolean] Enable Key Phrases, either true or false
|
142
142
|
# @param audio_start_from [Integer] The point in time, in milliseconds, to begin transcribing in your media file
|
143
143
|
# @param audio_end_at [Integer] The point in time, in milliseconds, to stop transcribing in your media file
|
144
144
|
# @param word_boost [Array<String>] The list of custom vocabulary to boost transcription probability for
|
@@ -168,14 +168,14 @@ module AssemblyAI
|
|
168
168
|
# @param content_safety [Boolean] Enable [Content
|
169
169
|
# Moderation](https://www.assemblyai.com/docs/models/content-moderation), can be
|
170
170
|
# true or false
|
171
|
-
# @param content_safety_confidence [Integer] The confidence threshold for
|
172
|
-
# 100.
|
171
|
+
# @param content_safety_confidence [Integer] The confidence threshold for the Content Moderation model. Values must be
|
172
|
+
# between 25 and 100.
|
173
173
|
# @param iab_categories [Boolean] Enable [Topic
|
174
174
|
# Detection](https://www.assemblyai.com/docs/models/topic-detection), can be true
|
175
175
|
# or false
|
176
|
-
# @param language_detection [Boolean]
|
177
|
-
#
|
178
|
-
#
|
176
|
+
# @param language_detection [Boolean] Enable [Automatic language
|
177
|
+
# www.assemblyai.com/docs/models/speech-recognition#automatic-language-detection),
|
178
|
+
# either true or false.
|
179
179
|
# @param custom_spelling [Array<AssemblyAI::Transcripts::TranscriptCustomSpelling>] Customize how words are spelled and formatted using to and from values
|
180
180
|
# @param disfluencies [Boolean] Transcribe Filler Words, like "umm", in your media file; can be true or false
|
181
181
|
# @param sentiment_analysis [Boolean] Enable [Sentiment
|
@@ -192,8 +192,8 @@ module AssemblyAI
|
|
192
192
|
# can be true or false
|
193
193
|
# @param summary_model [AssemblyAI::Transcripts::SummaryModel] The model to summarize the transcript
|
194
194
|
# @param summary_type [AssemblyAI::Transcripts::SummaryType] The type of summary
|
195
|
-
# @param custom_topics [Boolean]
|
196
|
-
# @param topics [Array<String>] The list of custom topics
|
195
|
+
# @param custom_topics [Boolean] Enable custom topics, either true or false
|
196
|
+
# @param topics [Array<String>] The list of custom topics
|
197
197
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
198
198
|
# @return [AssemblyAI::Transcripts::TranscriptOptionalParams]
|
199
199
|
def initialize(language_code: OMIT, punctuate: OMIT, format_text: OMIT, dual_channel: OMIT, speech_model: OMIT,
|
data/lib/requests.rb
CHANGED
@@ -22,14 +22,14 @@ module AssemblyAI
|
|
22
22
|
# @param timeout_in_seconds [Long]
|
23
23
|
# @param api_key [String]
|
24
24
|
# @return [AssemblyAI::RequestClient]
|
25
|
-
def initialize(api_key:, environment: Environment::DEFAULT, base_url: nil, max_retries: nil,
|
25
|
+
def initialize(api_key:, environment: AssemblyAI::Environment::DEFAULT, base_url: nil, max_retries: nil,
|
26
26
|
timeout_in_seconds: nil)
|
27
27
|
@default_environment = environment
|
28
28
|
@base_url = environment || base_url
|
29
29
|
@headers = {
|
30
30
|
"X-Fern-Language": "Ruby",
|
31
31
|
"X-Fern-SDK-Name": "assemblyai",
|
32
|
-
"X-Fern-SDK-Version": "1.0.0-beta.
|
32
|
+
"X-Fern-SDK-Version": "1.0.0-beta.10",
|
33
33
|
"Authorization": api_key.to_s
|
34
34
|
}
|
35
35
|
@conn = Faraday.new(headers: @headers) do |faraday|
|
@@ -63,14 +63,14 @@ module AssemblyAI
|
|
63
63
|
# @param timeout_in_seconds [Long]
|
64
64
|
# @param api_key [String]
|
65
65
|
# @return [AssemblyAI::AsyncRequestClient]
|
66
|
-
def initialize(api_key:, environment: Environment::DEFAULT, base_url: nil, max_retries: nil,
|
66
|
+
def initialize(api_key:, environment: AssemblyAI::Environment::DEFAULT, base_url: nil, max_retries: nil,
|
67
67
|
timeout_in_seconds: nil)
|
68
68
|
@default_environment = environment
|
69
69
|
@base_url = environment || base_url
|
70
70
|
@headers = {
|
71
71
|
"X-Fern-Language": "Ruby",
|
72
72
|
"X-Fern-SDK-Name": "assemblyai",
|
73
|
-
"X-Fern-SDK-Version": "1.0.0-beta.
|
73
|
+
"X-Fern-SDK-Version": "1.0.0-beta.10",
|
74
74
|
"Authorization": api_key.to_s
|
75
75
|
}
|
76
76
|
@conn = Faraday.new(headers: @headers) do |faraday|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: assemblyai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.pre.beta.
|
4
|
+
version: 1.0.0.pre.beta.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async-http-faraday
|