Class AudioTranslationRequest
public sealed class AudioTranslationRequest : IDisposable
- Inheritance
-
AudioTranslationRequest
- Implements
- Inherited Members
Constructors
AudioTranslationRequest(Stream, string, string, string, AudioResponseFormat, float?)
Constructor.
public AudioTranslationRequest(Stream audio, string audioName, string model = null, string prompt = null, AudioResponseFormat responseFormat = AudioResponseFormat.Json, float? temperature = null)
Parameters
audioStreamThe audio file to translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
audioNamestringThe name of the audio file to translate.
modelstringID of the model to use. Only whisper-1 is currently available.
promptstringOptional, An optional text to guide the model's style or continue a previous audio segment.
The prompt should be in English.responseFormatAudioResponseFormatOptional, The format of the transcript output, in one of these options: json, text, srt, verbose_json, or vtt.
Defaults to json.temperaturefloat?The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.
Defaults to 0
AudioTranslationRequest(string, string, string, AudioResponseFormat, float?)
Constructor.
public AudioTranslationRequest(string audioPath, string model = null, string prompt = "response should be in english.", AudioResponseFormat responseFormat = AudioResponseFormat.Json, float? temperature = null)
Parameters
audioPathstringThe audio file to translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
modelstringID of the model to use. Only whisper-1 is currently available.
promptstringOptional, An optional text to guide the model's style or continue a previous audio segment.
The prompt should be in English.responseFormatAudioResponseFormatOptional, The format of the transcript output, in one of these options: json, text, srt, verbose_json, or vtt.
Defaults to json.temperaturefloat?The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.
Defaults to 0
Properties
Audio
The audio file to translate, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm.
public Stream Audio { get; }
Property Value
AudioName
The name of the audio file to translate.
public string AudioName { get; }
Property Value
Model
ID of the model to use. Only whisper-1 is currently available.
public string Model { get; }
Property Value
Prompt
Optional, An optional text to guide the model's style or continue a previous audio segment.
The prompt should be in English.
public string Prompt { get; }
Property Value
ResponseFormat
Optional, The format of the transcript output, in one of these options: json, text, srt, verbose_json, or vtt.
Defaults to json.
public AudioResponseFormat ResponseFormat { get; }
Property Value
Temperature
The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random,
while lower values like 0.2 will make it more focused and deterministic. If set to 0,
the model will use log probability to automatically increase the temperature until certain thresholds are hit.
Defaults to 0
public float? Temperature { get; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
~AudioTranslationRequest()
protected ~AudioTranslationRequest()