AssemblyAI provider options example
Example of using provider-specific options with AssemblyAI transcription: import { transcribe } from 'ai'; import { assemblyai } from '@ai-sdk/assemblyai'; import { type AssemblyAITranscriptionModelOptions } from '@ai-sdk/assemblyai'; import { readFile } from 'fs/promises'; const result = await transcribe({ model: assemblyai.transcription('universal-3-5-pro'), audio: await readFile('audio.mp3'), providerOptions: { assemblyai: { contentSafety: true, } satisfies AssemblyAITranscriptionModelOptions, }, });
AssemblyAI audioEndAt provider option
audioEndAt is an optional number parameter specifying the end time of the audio in milliseconds.
AssemblyAI audioStartFrom provider option
audioStartFrom is an optional number parameter specifying the start time of the audio in milliseconds.
AssemblyAI autoChapters provider option
autoChapters is an optional boolean parameter for whether to automatically generate chapters for the transcription.
AssemblyAI autoHighlights provider option
autoHighlights is an optional boolean parameter for whether to automatically generate highlights for the transcription.
AssemblyAI boostParam provider option
boostParam is an optional enum parameter for boost parameter for wordBoost with allowed values 'low', 'default', 'high'. It is deprecated and only applies to the deprecated wordBoost; use keytermsPrompt instead.
AssemblyAI contentSafety provider option
contentSafety is an optional boolean parameter for whether to enable content safety filtering.
AssemblyAI contentSafetyConfidence provider option
contentSafetyConfidence is an optional number parameter for confidence threshold for content safety filtering with range 25-100.
AssemblyAI customSpelling provider option
customSpelling is an optional array of objects parameter for custom spelling rules for the transcription. Each object has 'from' (array of strings) and 'to' (string) properties.
AssemblyAI disfluencies provider option
disfluencies is an optional boolean parameter for whether to include disfluencies (um, uh, etc.) in the transcription.
AssemblyAI domain provider option
domain is an optional string parameter to enable a domain-specific model for specialized terminology. Currently supports 'medical-v1' for Medical Mode.
AssemblyAI entityDetection provider option
entityDetection is an optional boolean parameter for whether to detect entities in the transcription.
AssemblyAI filterProfanity provider option
filterProfanity is an optional boolean parameter for whether to filter profanity in the transcription.
AssemblyAI formatText provider option
formatText is an optional boolean parameter for whether to format the text in the transcription.
AssemblyAI iabCategories provider option
iabCategories is an optional boolean parameter for whether to include IAB categories in the transcription.
AssemblyAI keytermsPrompt provider option
keytermsPrompt is an optional array of strings parameter for domain-specific keyterms to boost recognition for with a maximum of 6 words per phrase. It replaces wordBoost for newer models and is supported by universal-3-pro, universal-3-5-pro, slam-1, and universal-2 when enabled.
AssemblyAI languageCode provider option
languageCode is an optional string parameter for language code for the audio. It supports numerous ISO-639-1 and ISO-639-3 language codes.
AssemblyAI languageConfidenceThreshold provider option
languageConfidenceThreshold is an optional number parameter for confidence threshold for language detection.
AssemblyAI languageDetection provider option
languageDetection is an optional boolean parameter for whether to enable language detection.
AssemblyAI languageDetectionOptions provider option
languageDetectionOptions is an optional object parameter with properties for automatic language detection: expectedLanguages (array of strings), fallbackLanguage (string), codeSwitching (boolean), codeSwitchingConfidenceThreshold (number, 0-1).
AssemblyAI multichannel provider option
multichannel is an optional boolean parameter for whether to process multiple audio channels separately.
AssemblyAI prompt provider option
prompt is an optional string parameter for natural-language context (up to 1,500 words) to steer the model. It is only supported by universal-3-pro, universal-3-5-pro, and slam-1.
AssemblyAI punctuate provider option
punctuate is an optional boolean parameter for whether to add punctuation to the transcription.
AssemblyAI redactPii provider option
redactPii is an optional boolean parameter for whether to redact personally identifiable information.
AssemblyAI redactPiiAudio provider option
redactPiiAudio is an optional boolean parameter for whether to redact PII in the audio file.
AssemblyAI redactPiiAudioOptions provider option
redactPiiAudioOptions is an optional object parameter with properties for PII-redacted audio: returnRedactedNoSpeechAudio (boolean), overrideAudioRedactionMethod ('silence'). Requires redactPiiAudio.
AssemblyAI redactPiiAudioQuality provider option
redactPiiAudioQuality is an optional enum parameter for quality of the redacted audio file with allowed values 'mp3', 'wav'.
AssemblyAI redactPiiPolicies provider option
redactPiiPolicies is an optional array of enums parameter for policies for PII redaction, specifying which types of information to redact. It supports numerous types including person_name, phone_number, and others.
AssemblyAI redactPiiReturnUnredacted provider option
redactPiiReturnUnredacted is an optional boolean parameter for whether to return the original unredacted transcript alongside the redacted one. Requires redactPii.
AssemblyAI redactPiiSub provider option
redactPiiSub is an optional enum parameter for substitution method for redacted PII with allowed values 'entity_name', 'hash'.
AssemblyAI redactStaticEntities provider option
redactStaticEntities is an optional object parameter as a map of user-defined labels to exact terms to redact, e.g. { INTERNAL_TOOL: ['Bearclaw'] }. It is applied on top of standard PII redaction and requires redactPii.
AssemblyAI removeAudioTags provider option
removeAudioTags is an optional enum parameter to remove inline annotations from rich transcripts with allowed values 'all' (all annotations), 'speaker' (speaker cues only). Applies to Universal-3 Pro models.
AssemblyAI sentimentAnalysis provider option
sentimentAnalysis is an optional boolean parameter for whether to perform sentiment analysis on the transcription.
AssemblyAI speakerLabels provider option
speakerLabels is an optional boolean parameter for whether to label different speakers in the transcription.
AssemblyAI speakerOptions provider option
speakerOptions is an optional object parameter with properties for speaker diarization: minSpeakersExpected (number), maxSpeakersExpected (number).
AssemblyAI speakersExpected provider option
speakersExpected is an optional number parameter for expected number of speakers in the audio.
AssemblyAI speechThreshold provider option
speechThreshold is an optional number parameter for threshold for speech detection with range 0-1.
AssemblyAI summarization provider option
summarization is an optional boolean parameter for whether to generate a summary of the transcription.
AssemblyAI summaryModel provider option
summaryModel is an optional enum parameter for model to use for summarization with allowed values 'informative', 'conversational', 'catchy'.
AssemblyAI summaryType provider option
summaryType is an optional enum parameter for type of summary to generate with allowed values 'bullets', 'bullets_verbose', 'gist', 'headline', 'paragraph'.
AssemblyAI temperature provider option
temperature is an optional number parameter for sampling temperature (0-1) controlling randomness. Applies to Universal-3 Pro models.
AssemblyAI webhookUrl provider option
webhookUrl is an optional string parameter for URL to send webhook notifications to.
AssemblyAI wordBoost provider option
wordBoost is an optional array of strings parameter for list of words to boost in the transcription. It is deprecated and rejected by universal-3-pro, universal-3-5-pro, and slam-1 (works only on universal-2/best); use keytermsPrompt instead.
AssemblyAI webhook authentication header options
AssemblyAI provides two optional string parameters for configuring authentication headers on webhook requests:
- webhookAuthHeaderName: The name of the authentication header for webhook requests.
- webhookAuthHeaderValue: The value of the authentication header for webhook requests.