Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit 32203ad

Browse files
committed
SDK regeneration
1 parent fc85760 commit 32203ad

15 files changed

Lines changed: 182 additions & 114 deletions

lib/assemblyai/lemur/types/lemur_model.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class LemurModel
99
ANTHROPIC_CLAUDE3_HAIKU = "anthropic/claude-3-haiku"
1010
ANTHROPIC_CLAUDE3_SONNET = "anthropic/claude-3-sonnet"
1111
ANTHROPIC_CLAUDE2_1 = "anthropic/claude-2-1"
12-
ANTHROPIC_CLAUDE2 = "anthropic/claude-2"
12+
ANTHROPIC_CLAUDE2_0 = "anthropic/claude-2"
1313
DEFAULT = "default"
1414
ANTHROPIC_CLAUDE_INSTANT1_2 = "anthropic/claude-instant-1-2"
1515
BASIC = "basic"

lib/assemblyai/transcripts/client.rb

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def initialize(request_client:)
3535
# Transcripts are sorted from newest to oldest. The previous URL always points to
3636
# a page with older transcripts.
3737
#
38-
# @param limit [Long] Maximum amount of transcripts to retrieve
38+
# @param limit [Integer] Maximum amount of transcripts to retrieve
3939
# @param status [AssemblyAI::Transcripts::TranscriptStatus] Filter by transcript status
4040
# @param created_on [String] Only get transcripts created on this date
4141
# @param before_id [String] Get transcripts that were created before this transcript ID
@@ -83,12 +83,16 @@ def list(limit: nil, status: nil, created_on: nil, before_id: nil, after_id: nil
8383
# @param punctuate [Boolean] Enable Automatic Punctuation, can be true or false
8484
# @param format_text [Boolean] Enable Text Formatting, can be true or false
8585
# @param disfluencies [Boolean] Transcribe Filler Words, like "umm", in your media file; can be true or false
86+
# @param multichannel [Boolean] Enable
87+
# ://www.assemblyai.com/docs/models/speech-recognition#multichannel-transcription)
88+
# transcription, can be true or false.
8689
# @param dual_channel [Boolean] Enable [Dual
8790
# ://www.assemblyai.com/docs/models/speech-recognition#dual-channel-transcription)
8891
# transcription, can be true or false.
89-
# @param webhook_url [String] The URL to which we send webhook requests. We sends two different types of
90-
# webhook requests. One request when a transcript is completed or failed, and one
91-
# request when the redacted audio is ready if redact_pii_audio is enabled.
92+
# @param webhook_url [String] The URL to which we send webhook requests.
93+
# We sends two different types of webhook requests.
94+
# One request when a transcript is completed or failed, and one request when the
95+
# redacted audio is ready if redact_pii_audio is enabled.
9296
# @param webhook_auth_header_name [String] The header name to be sent with the transcript completed or failed webhook
9397
# requests
9498
# @param webhook_auth_header_value [String] The header value to send back with the transcript completed or failed webhook
@@ -158,7 +162,7 @@ def list(limit: nil, status: nil, created_on: nil, before_id: nil, after_id: nil
158162
# )
159163
# api.transcripts.submit(audio_url: "https://assembly.ai/wildfires.mp3")
160164
def submit(audio_url:, language_code: nil, language_detection: nil, language_confidence_threshold: nil, speech_model: nil,
161-
punctuate: nil, format_text: nil, disfluencies: nil, dual_channel: nil, webhook_url: nil, webhook_auth_header_name: nil, webhook_auth_header_value: nil, auto_highlights: nil, audio_start_from: nil, audio_end_at: nil, word_boost: nil, boost_param: nil, filter_profanity: nil, redact_pii: nil, redact_pii_audio: nil, redact_pii_audio_quality: nil, redact_pii_policies: nil, redact_pii_sub: nil, speaker_labels: nil, speakers_expected: nil, content_safety: nil, content_safety_confidence: nil, iab_categories: nil, custom_spelling: nil, sentiment_analysis: nil, auto_chapters: nil, entity_detection: nil, speech_threshold: nil, summarization: nil, summary_model: nil, summary_type: nil, custom_topics: nil, topics: nil, request_options: nil)
165+
punctuate: nil, format_text: nil, disfluencies: nil, multichannel: nil, dual_channel: nil, webhook_url: nil, webhook_auth_header_name: nil, webhook_auth_header_value: nil, auto_highlights: nil, audio_start_from: nil, audio_end_at: nil, word_boost: nil, boost_param: nil, filter_profanity: nil, redact_pii: nil, redact_pii_audio: nil, redact_pii_audio_quality: nil, redact_pii_policies: nil, redact_pii_sub: nil, speaker_labels: nil, speakers_expected: nil, content_safety: nil, content_safety_confidence: nil, iab_categories: nil, custom_spelling: nil, sentiment_analysis: nil, auto_chapters: nil, entity_detection: nil, speech_threshold: nil, summarization: nil, summary_model: nil, summary_type: nil, custom_topics: nil, topics: nil, request_options: nil)
162166
response = @request_client.conn.post do |req|
163167
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
164168
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
@@ -172,6 +176,7 @@ def submit(audio_url:, language_code: nil, language_detection: nil, language_con
172176
punctuate: punctuate,
173177
format_text: format_text,
174178
disfluencies: disfluencies,
179+
multichannel: multichannel,
175180
dual_channel: dual_channel,
176181
webhook_url: webhook_url,
177182
webhook_auth_header_name: webhook_auth_header_name,
@@ -380,7 +385,7 @@ def initialize(request_client:)
380385
# Transcripts are sorted from newest to oldest. The previous URL always points to
381386
# a page with older transcripts.
382387
#
383-
# @param limit [Long] Maximum amount of transcripts to retrieve
388+
# @param limit [Integer] Maximum amount of transcripts to retrieve
384389
# @param status [AssemblyAI::Transcripts::TranscriptStatus] Filter by transcript status
385390
# @param created_on [String] Only get transcripts created on this date
386391
# @param before_id [String] Get transcripts that were created before this transcript ID
@@ -430,12 +435,16 @@ def list(limit: nil, status: nil, created_on: nil, before_id: nil, after_id: nil
430435
# @param punctuate [Boolean] Enable Automatic Punctuation, can be true or false
431436
# @param format_text [Boolean] Enable Text Formatting, can be true or false
432437
# @param disfluencies [Boolean] Transcribe Filler Words, like "umm", in your media file; can be true or false
438+
# @param multichannel [Boolean] Enable
439+
# ://www.assemblyai.com/docs/models/speech-recognition#multichannel-transcription)
440+
# transcription, can be true or false.
433441
# @param dual_channel [Boolean] Enable [Dual
434442
# ://www.assemblyai.com/docs/models/speech-recognition#dual-channel-transcription)
435443
# transcription, can be true or false.
436-
# @param webhook_url [String] The URL to which we send webhook requests. We sends two different types of
437-
# webhook requests. One request when a transcript is completed or failed, and one
438-
# request when the redacted audio is ready if redact_pii_audio is enabled.
444+
# @param webhook_url [String] The URL to which we send webhook requests.
445+
# We sends two different types of webhook requests.
446+
# One request when a transcript is completed or failed, and one request when the
447+
# redacted audio is ready if redact_pii_audio is enabled.
439448
# @param webhook_auth_header_name [String] The header name to be sent with the transcript completed or failed webhook
440449
# requests
441450
# @param webhook_auth_header_value [String] The header value to send back with the transcript completed or failed webhook
@@ -505,7 +514,7 @@ def list(limit: nil, status: nil, created_on: nil, before_id: nil, after_id: nil
505514
# )
506515
# api.transcripts.submit(audio_url: "https://assembly.ai/wildfires.mp3")
507516
def submit(audio_url:, language_code: nil, language_detection: nil, language_confidence_threshold: nil, speech_model: nil,
508-
punctuate: nil, format_text: nil, disfluencies: nil, dual_channel: nil, webhook_url: nil, webhook_auth_header_name: nil, webhook_auth_header_value: nil, auto_highlights: nil, audio_start_from: nil, audio_end_at: nil, word_boost: nil, boost_param: nil, filter_profanity: nil, redact_pii: nil, redact_pii_audio: nil, redact_pii_audio_quality: nil, redact_pii_policies: nil, redact_pii_sub: nil, speaker_labels: nil, speakers_expected: nil, content_safety: nil, content_safety_confidence: nil, iab_categories: nil, custom_spelling: nil, sentiment_analysis: nil, auto_chapters: nil, entity_detection: nil, speech_threshold: nil, summarization: nil, summary_model: nil, summary_type: nil, custom_topics: nil, topics: nil, request_options: nil)
517+
punctuate: nil, format_text: nil, disfluencies: nil, multichannel: nil, dual_channel: nil, webhook_url: nil, webhook_auth_header_name: nil, webhook_auth_header_value: nil, auto_highlights: nil, audio_start_from: nil, audio_end_at: nil, word_boost: nil, boost_param: nil, filter_profanity: nil, redact_pii: nil, redact_pii_audio: nil, redact_pii_audio_quality: nil, redact_pii_policies: nil, redact_pii_sub: nil, speaker_labels: nil, speakers_expected: nil, content_safety: nil, content_safety_confidence: nil, iab_categories: nil, custom_spelling: nil, sentiment_analysis: nil, auto_chapters: nil, entity_detection: nil, speech_threshold: nil, summarization: nil, summary_model: nil, summary_type: nil, custom_topics: nil, topics: nil, request_options: nil)
509518
Async do
510519
response = @request_client.conn.post do |req|
511520
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -520,6 +529,7 @@ def submit(audio_url:, language_code: nil, language_detection: nil, language_con
520529
punctuate: punctuate,
521530
format_text: format_text,
522531
disfluencies: disfluencies,
532+
multichannel: multichannel,
523533
dual_channel: dual_channel,
524534
webhook_url: webhook_url,
525535
webhook_auth_header_name: webhook_auth_header_name,

lib/assemblyai/transcripts/types/content_safety_labels_result.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class ContentSafetyLabelsResult
1515
# @return [AssemblyAI::Transcripts::AudioIntelligenceModelStatus] The status of the Content Moderation model. Either success, or unavailable in
1616
# the rare case that the model failed.
1717
attr_reader :status
18-
# @return [Array<AssemblyAI::Transcripts::ContentSafetyLabelResult>]
18+
# @return [Array<AssemblyAI::Transcripts::ContentSafetyLabelResult>] An array of results for the Content Moderation model
1919
attr_reader :results
2020
# @return [Hash{String => Float}] A summary of the Content Moderation confidence results for the entire audio file
2121
attr_reader :summary
@@ -31,7 +31,7 @@ class ContentSafetyLabelsResult
3131

3232
# @param status [AssemblyAI::Transcripts::AudioIntelligenceModelStatus] The status of the Content Moderation model. Either success, or unavailable in
3333
# the rare case that the model failed.
34-
# @param results [Array<AssemblyAI::Transcripts::ContentSafetyLabelResult>]
34+
# @param results [Array<AssemblyAI::Transcripts::ContentSafetyLabelResult>] An array of results for the Content Moderation model
3535
# @param summary [Hash{String => Float}] A summary of the Content Moderation confidence results for the entire audio file
3636
# @param severity_score_summary [Hash{String => AssemblyAI::Transcripts::SeverityScoreSummary}] A summary of the Content Moderation severity results for the entire audio file
3737
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition

lib/assemblyai/transcripts/types/paragraphs_response.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
module AssemblyAI
88
class Transcripts
99
class ParagraphsResponse
10-
# @return [String]
10+
# @return [String] The unique identifier of your transcript
1111
attr_reader :id
12-
# @return [Float]
12+
# @return [Float] The confidence score for the transcript
1313
attr_reader :confidence
14-
# @return [Float]
14+
# @return [Float] The duration of the audio file in seconds
1515
attr_reader :audio_duration
16-
# @return [Array<AssemblyAI::Transcripts::TranscriptParagraph>]
16+
# @return [Array<AssemblyAI::Transcripts::TranscriptParagraph>] An array of paragraphs in the transcript
1717
attr_reader :paragraphs
1818
# @return [OpenStruct] Additional properties unmapped to the current class definition
1919
attr_reader :additional_properties
@@ -23,10 +23,10 @@ class ParagraphsResponse
2323

2424
OMIT = Object.new
2525

26-
# @param id [String]
27-
# @param confidence [Float]
28-
# @param audio_duration [Float]
29-
# @param paragraphs [Array<AssemblyAI::Transcripts::TranscriptParagraph>]
26+
# @param id [String] The unique identifier of your transcript
27+
# @param confidence [Float] The confidence score for the transcript
28+
# @param audio_duration [Float] The duration of the audio file in seconds
29+
# @param paragraphs [Array<AssemblyAI::Transcripts::TranscriptParagraph>] An array of paragraphs in the transcript
3030
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
3131
# @return [AssemblyAI::Transcripts::ParagraphsResponse]
3232
def initialize(id:, confidence:, audio_duration:, paragraphs:, additional_properties: nil)

lib/assemblyai/transcripts/types/sentences_response.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
module AssemblyAI
88
class Transcripts
99
class SentencesResponse
10-
# @return [String]
10+
# @return [String] The unique identifier for the transcript
1111
attr_reader :id
12-
# @return [Float]
12+
# @return [Float] The confidence score for the transcript
1313
attr_reader :confidence
14-
# @return [Float]
14+
# @return [Float] The duration of the audio file in seconds
1515
attr_reader :audio_duration
16-
# @return [Array<AssemblyAI::Transcripts::TranscriptSentence>]
16+
# @return [Array<AssemblyAI::Transcripts::TranscriptSentence>] An array of sentences in the transcript
1717
attr_reader :sentences
1818
# @return [OpenStruct] Additional properties unmapped to the current class definition
1919
attr_reader :additional_properties
@@ -23,10 +23,10 @@ class SentencesResponse
2323

2424
OMIT = Object.new
2525

26-
# @param id [String]
27-
# @param confidence [Float]
28-
# @param audio_duration [Float]
29-
# @param sentences [Array<AssemblyAI::Transcripts::TranscriptSentence>]
26+
# @param id [String] The unique identifier for the transcript
27+
# @param confidence [Float] The confidence score for the transcript
28+
# @param audio_duration [Float] The duration of the audio file in seconds
29+
# @param sentences [Array<AssemblyAI::Transcripts::TranscriptSentence>] An array of sentences in the transcript
3030
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
3131
# @return [AssemblyAI::Transcripts::SentencesResponse]
3232
def initialize(id:, confidence:, audio_duration:, sentences:, additional_properties: nil)

lib/assemblyai/transcripts/types/sentiment_analysis_result.rb

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ class SentimentAnalysisResult
1818
attr_reader :sentiment
1919
# @return [Float] The confidence score for the detected sentiment of the sentence, from 0 to 1
2020
attr_reader :confidence
21+
# @return [String] The channel of this utterance. The left and right channels are channels 1 and 2.
22+
# Additional channels increment the channel number sequentially.
23+
attr_reader :channel
2124
# @return [String] The speaker of the sentence if [Speaker
2225
# Diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is
2326
# enabled, else null
@@ -35,17 +38,21 @@ class SentimentAnalysisResult
3538
# @param end_ [Integer] The ending time, in milliseconds, of the sentence
3639
# @param sentiment [AssemblyAI::Transcripts::Sentiment] The detected sentiment for the sentence, one of POSITIVE, NEUTRAL, NEGATIVE
3740
# @param confidence [Float] The confidence score for the detected sentiment of the sentence, from 0 to 1
41+
# @param channel [String] The channel of this utterance. The left and right channels are channels 1 and 2.
42+
# Additional channels increment the channel number sequentially.
3843
# @param speaker [String] The speaker of the sentence if [Speaker
3944
# Diarization](https://www.assemblyai.com/docs/models/speaker-diarization) is
4045
# enabled, else null
4146
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
4247
# @return [AssemblyAI::Transcripts::SentimentAnalysisResult]
43-
def initialize(text:, start:, end_:, sentiment:, confidence:, speaker: OMIT, additional_properties: nil)
48+
def initialize(text:, start:, end_:, sentiment:, confidence:, channel: OMIT, speaker: OMIT,
49+
additional_properties: nil)
4450
@text = text
4551
@start = start
4652
@end_ = end_
4753
@sentiment = sentiment
4854
@confidence = confidence
55+
@channel = channel if channel != OMIT
4956
@speaker = speaker if speaker != OMIT
5057
@additional_properties = additional_properties
5158
@_field_set = {
@@ -54,6 +61,7 @@ def initialize(text:, start:, end_:, sentiment:, confidence:, speaker: OMIT, add
5461
"end": end_,
5562
"sentiment": sentiment,
5663
"confidence": confidence,
64+
"channel": channel,
5765
"speaker": speaker
5866
}.reject do |_k, v|
5967
v == OMIT
@@ -71,13 +79,15 @@ def self.from_json(json_object:)
7179
end_ = struct["end"]
7280
sentiment = struct["sentiment"]
7381
confidence = struct["confidence"]
82+
channel = struct["channel"]
7483
speaker = struct["speaker"]
7584
new(
7685
text: text,
7786
start: start,
7887
end_: end_,
7988
sentiment: sentiment,
8089
confidence: confidence,
90+
channel: channel,
8191
speaker: speaker,
8292
additional_properties: struct
8393
)
@@ -102,6 +112,7 @@ def self.validate_raw(obj:)
102112
obj.end_.is_a?(Integer) != false || raise("Passed value for field obj.end_ is not the expected type, validation failed.")
103113
obj.sentiment.is_a?(AssemblyAI::Transcripts::Sentiment) != false || raise("Passed value for field obj.sentiment is not the expected type, validation failed.")
104114
obj.confidence.is_a?(Float) != false || raise("Passed value for field obj.confidence is not the expected type, validation failed.")
115+
obj.channel&.is_a?(String) != false || raise("Passed value for field obj.channel is not the expected type, validation failed.")
105116
obj.speaker&.is_a?(String) != false || raise("Passed value for field obj.speaker is not the expected type, validation failed.")
106117
end
107118
end

lib/assemblyai/transcripts/types/topic_detection_result.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class Transcripts
1111
class TopicDetectionResult
1212
# @return [String] The text in the transcript in which a detected topic occurs
1313
attr_reader :text
14-
# @return [Array<AssemblyAI::Transcripts::TopicDetectionResultLabelsItem>]
14+
# @return [Array<AssemblyAI::Transcripts::TopicDetectionResultLabelsItem>] An array of detected topics in the text
1515
attr_reader :labels
1616
# @return [AssemblyAI::Transcripts::Timestamp]
1717
attr_reader :timestamp
@@ -24,7 +24,7 @@ class TopicDetectionResult
2424
OMIT = Object.new
2525

2626
# @param text [String] The text in the transcript in which a detected topic occurs
27-
# @param labels [Array<AssemblyAI::Transcripts::TopicDetectionResultLabelsItem>]
27+
# @param labels [Array<AssemblyAI::Transcripts::TopicDetectionResultLabelsItem>] An array of detected topics in the text
2828
# @param timestamp [AssemblyAI::Transcripts::Timestamp]
2929
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
3030
# @return [AssemblyAI::Transcripts::TopicDetectionResult]

0 commit comments

Comments
 (0)