OpenAISpeechTranslationModel
Namespace: Vercel.AI.OpenAI
public sealed class OpenAISpeechTranslationModel : ISpeechTranslationModelOpenAI speech translation model. REST calls use /audio/translations.
Inheritance: object
Implements: ISpeechTranslationModel
Constructors
Section titled “Constructors”OpenAISpeechTranslationModel(OpenAIProvider, string)
Section titled “OpenAISpeechTranslationModel(OpenAIProvider, string)”public OpenAISpeechTranslationModel(OpenAIProvider provider, string modelId)Creates a speech translation model.
Parameters
| Name | Type | Description |
|---|---|---|
provider |
OpenAIProvider | |
modelId |
string |
Properties
Section titled “Properties”ModelId
Section titled “ModelId”public string ModelId { get; }Model id.
Value: string
Provider
Section titled “Provider”public string Provider { get; }Provider id.
Value: string
Methods
Section titled “Methods”DoTranslateAsync(AudioInput, CancellationToken)
Section titled “DoTranslateAsync(AudioInput, CancellationToken)”public Task<TranscriptionResult> DoTranslateAsync(AudioInput audio, CancellationToken cancellationToken)Translates speech into text.
Parameters
| Name | Type | Description |
|---|---|---|
audio |
AudioInput | |
cancellationToken |
CancellationToken |
Returns: Task<TranscriptionResult>
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product