TranslationStreamCall
Namespace: Vercel.AI.Operations
public sealed class TranslationStreamCallArguments for a speech-translation stream.
Inheritance: object
Constructors
Section titled “Constructors”TranslationStreamCall(AudioChunkStream, string, string, string?, string?, JsonElement, IReadOnlyDictionary<string, string>, bool?, CancellationToken)
Section titled “TranslationStreamCall(AudioChunkStream, string, string, string?, string?, JsonElement, IReadOnlyDictionary<string, string>, bool?, CancellationToken)”public TranslationStreamCall(AudioChunkStream audio, string inputAudioFormat, string targetLanguage, string? sourceLanguage, string? outputAudioFormat, JsonElement providerOptions, IReadOnlyDictionary<string, string> headers, bool? includeRawChunks, CancellationToken cancellationToken)Creates a translation call.
Parameters
| Name | Type | Description |
|---|---|---|
audio |
AudioChunkStream | |
inputAudioFormat |
string | |
targetLanguage |
string | |
sourceLanguage |
string | |
outputAudioFormat |
string | |
providerOptions |
JsonElement | |
headers |
IReadOnlyDictionary<string, string> | |
includeRawChunks |
bool? | |
cancellationToken |
CancellationToken |
Properties
Section titled “Properties”public AudioChunkStream Audio { get; }Audio stream.
Value: AudioChunkStream
CancellationToken
Section titled “CancellationToken”public CancellationToken CancellationToken { get; }Cancellation token shared with fullStream cancellation.
Value: CancellationToken
Headers
Section titled “Headers”public IReadOnlyDictionary<string, string> Headers { get; }Headers including the user-agent suffix.
Value: IReadOnlyDictionary<string, string>
IncludeRawChunks
Section titled “IncludeRawChunks”public bool? IncludeRawChunks { get; }When true, raw parts are requested.
Value: bool?
InputAudioFormat
Section titled “InputAudioFormat”public string InputAudioFormat { get; }Input audio format.
Value: string
OutputAudioFormat
Section titled “OutputAudioFormat”public string? OutputAudioFormat { get; }Requested output audio format.
Value: string
ProviderOptions
Section titled “ProviderOptions”public JsonElement ProviderOptions { get; }Provider options.
Value: JsonElement
SourceLanguage
Section titled “SourceLanguage”public string? SourceLanguage { get; }Source language. Null asks the provider to detect it.
Value: string
TargetLanguage
Section titled “TargetLanguage”public string TargetLanguage { get; }Target language.
Value: string
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product