Skip to content

Commit

Permalink
Merge pull request #52 from AssemblyAI/fern-bot/10-17-2024-0925PM
Browse files Browse the repository at this point in the history
🌿 Fern Regeneration -- October 17, 2024
  • Loading branch information
Swimburger authored Oct 17, 2024
2 parents fc85760 + 60476c4 commit 60ba7d8
Show file tree
Hide file tree
Showing 18 changed files with 363 additions and 182 deletions.
1 change: 1 addition & 0 deletions lib/assemblyai/lemur/types/lemur_model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class LemurModel
ANTHROPIC_CLAUDE3_SONNET = "anthropic/claude-3-sonnet"
ANTHROPIC_CLAUDE2_1 = "anthropic/claude-2-1"
ANTHROPIC_CLAUDE2 = "anthropic/claude-2"
ANTHROPIC_CLAUDE2_0 = "anthropic/claude-2"
DEFAULT = "default"
ANTHROPIC_CLAUDE_INSTANT1_2 = "anthropic/claude-instant-1-2"
BASIC = "basic"
Expand Down
30 changes: 20 additions & 10 deletions lib/assemblyai/transcripts/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def initialize(request_client:)
# Transcripts are sorted from newest to oldest. The previous URL always points to
# a page with older transcripts.
#
# @param limit [Long] Maximum amount of transcripts to retrieve
# @param limit [Integer] Maximum amount of transcripts to retrieve
# @param status [AssemblyAI::Transcripts::TranscriptStatus] Filter by transcript status
# @param created_on [String] Only get transcripts created on this date
# @param before_id [String] Get transcripts that were created before this transcript ID
Expand Down Expand Up @@ -83,12 +83,16 @@ def list(limit: nil, status: nil, created_on: nil, before_id: nil, after_id: nil
# @param punctuate [Boolean] Enable Automatic Punctuation, can be true or false
# @param format_text [Boolean] Enable Text Formatting, can be true or false
# @param disfluencies [Boolean] Transcribe Filler Words, like "umm", in your media file; can be true or false
# @param multichannel [Boolean] Enable
# ://www.assemblyai.com/docs/models/speech-recognition#multichannel-transcription)
# transcription, can be true or false.
# @param dual_channel [Boolean] Enable [Dual
# ://www.assemblyai.com/docs/models/speech-recognition#dual-channel-transcription)
# transcription, can be true or false.
# @param webhook_url [String] The URL to which we send webhook requests. We sends two different types of
# webhook requests. One request when a transcript is completed or failed, and one
# request when the redacted audio is ready if redact_pii_audio is enabled.
# @param webhook_url [String] The URL to which we send webhook requests.
# We sends two different types of webhook requests.
# One request when a transcript is completed or failed, and one request when the
# redacted audio is ready if redact_pii_audio is enabled.
# @param webhook_auth_header_name [String] The header name to be sent with the transcript completed or failed webhook
# requests
# @param webhook_auth_header_value [String] The header value to send back with the transcript completed or failed webhook
Expand Down Expand Up @@ -158,7 +162,7 @@ def list(limit: nil, status: nil, created_on: nil, before_id: nil, after_id: nil
# )
# api.transcripts.submit(audio_url: "https://assembly.ai/wildfires.mp3")
def submit(audio_url:, language_code: nil, language_detection: nil, language_confidence_threshold: nil, speech_model: nil,
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)
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)
response = @request_client.conn.post do |req|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
Expand All @@ -172,6 +176,7 @@ def submit(audio_url:, language_code: nil, language_detection: nil, language_con
punctuate: punctuate,
format_text: format_text,
disfluencies: disfluencies,
multichannel: multichannel,
dual_channel: dual_channel,
webhook_url: webhook_url,
webhook_auth_header_name: webhook_auth_header_name,
Expand Down Expand Up @@ -380,7 +385,7 @@ def initialize(request_client:)
# Transcripts are sorted from newest to oldest. The previous URL always points to
# a page with older transcripts.
#
# @param limit [Long] Maximum amount of transcripts to retrieve
# @param limit [Integer] Maximum amount of transcripts to retrieve
# @param status [AssemblyAI::Transcripts::TranscriptStatus] Filter by transcript status
# @param created_on [String] Only get transcripts created on this date
# @param before_id [String] Get transcripts that were created before this transcript ID
Expand Down Expand Up @@ -430,12 +435,16 @@ def list(limit: nil, status: nil, created_on: nil, before_id: nil, after_id: nil
# @param punctuate [Boolean] Enable Automatic Punctuation, can be true or false
# @param format_text [Boolean] Enable Text Formatting, can be true or false
# @param disfluencies [Boolean] Transcribe Filler Words, like "umm", in your media file; can be true or false
# @param multichannel [Boolean] Enable
# ://www.assemblyai.com/docs/models/speech-recognition#multichannel-transcription)
# transcription, can be true or false.
# @param dual_channel [Boolean] Enable [Dual
# ://www.assemblyai.com/docs/models/speech-recognition#dual-channel-transcription)
# transcription, can be true or false.
# @param webhook_url [String] The URL to which we send webhook requests. We sends two different types of
# webhook requests. One request when a transcript is completed or failed, and one
# request when the redacted audio is ready if redact_pii_audio is enabled.
# @param webhook_url [String] The URL to which we send webhook requests.
# We sends two different types of webhook requests.
# One request when a transcript is completed or failed, and one request when the
# redacted audio is ready if redact_pii_audio is enabled.
# @param webhook_auth_header_name [String] The header name to be sent with the transcript completed or failed webhook
# requests
# @param webhook_auth_header_value [String] The header value to send back with the transcript completed or failed webhook
Expand Down Expand Up @@ -505,7 +514,7 @@ def list(limit: nil, status: nil, created_on: nil, before_id: nil, after_id: nil
# )
# api.transcripts.submit(audio_url: "https://assembly.ai/wildfires.mp3")
def submit(audio_url:, language_code: nil, language_detection: nil, language_confidence_threshold: nil, speech_model: nil,
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)
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)
Async do
response = @request_client.conn.post do |req|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
Expand All @@ -520,6 +529,7 @@ def submit(audio_url:, language_code: nil, language_detection: nil, language_con
punctuate: punctuate,
format_text: format_text,
disfluencies: disfluencies,
multichannel: multichannel,
dual_channel: dual_channel,
webhook_url: webhook_url,
webhook_auth_header_name: webhook_auth_header_name,
Expand Down
Loading

0 comments on commit 60ba7d8

Please sign in to comment.