Class TranscriptionRequest
Task for converting speech audio into text (speech-to-text).
Inheritance
TranscriptionRequest
Assembly: Glitch9.AIDevKit.dll
Syntax
public sealed class TranscriptionRequest : TranscriptionRequestBase<TranscriptionRequest>, IGenerativeRequest, IStreamingGenerativeRequest<TranscriptDelta, Transcript>
Constructors
|
Edit this page
View Source
TranscriptionRequest(AudioPrompt)
Declaration
public TranscriptionRequest(AudioPrompt prompt)
Parameters
Properties
|
Edit this page
View Source
FileNameKey
Sets the temperature for transcription.
Higher values (e.g., 0.7) make the output more random,
while lower values (e.g., 0.2) 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.
Declaration
protected override string FileNameKey { get; }
Property Value
Overrides
|
Edit this page
View Source
RequestType
The endpoint type for this
Declaration
public override RequestType RequestType { get; }
Property Value
Overrides
|
Edit this page
View Source
SpokenLanguage
Declaration
public SystemLanguage SpokenLanguage { get; set; }
Property Value
| Type |
Description |
| SystemLanguage |
|
|
Edit this page
View Source
SpokenLanguages
Declaration
public List<SystemLanguage> SpokenLanguages { get; set; }
Property Value
| Type |
Description |
| List<SystemLanguage> |
|
|
Edit this page
View Source
Temperature
Declaration
public Temperature Temperature { get; set; }
Property Value
|
Edit this page
View Source
TimestampGranularities
The timestamp granularities to populate for this transcription.
response_format must be set verbose_json to use timestamp granularities.
Either or both of these options are supported: word, or segment.
Declaration
public string[] TimestampGranularities { get; set; }
Property Value
Methods
|
Edit this page
View Source
ExecuteAsyncInternal()
Executes the actual task logic. Must be implemented in derived classes.
Declaration
protected override UniTask<Generated<Transcript>> ExecuteAsyncInternal()
Returns
Overrides
|
Edit this page
View Source
SetSpokenLanguage(SystemLanguage)
Optionally sets the language hint to improve transcription accuracy.
Declaration
public TranscriptionRequest SetSpokenLanguage(SystemLanguage language)
Parameters
| Type |
Name |
Description |
| SystemLanguage |
language |
|
Returns
|
Edit this page
View Source
SetSpokenLanguages(params SystemLanguage[])
Declaration
public TranscriptionRequest SetSpokenLanguages(params SystemLanguage[] languages)
Parameters
| Type |
Name |
Description |
| SystemLanguage[] |
languages |
|
Returns
|
Edit this page
View Source
SetTimestampGranularities(params string[])
Declaration
public TranscriptionRequest SetTimestampGranularities(params string[] granularities)
Parameters
| Type |
Name |
Description |
| string[] |
granularities |
|
Returns
|
Edit this page
View Source
StreamAsyncInternal()
Declaration
protected override IGenerativeStream<TranscriptDelta, Transcript> StreamAsyncInternal()
Returns
Overrides
|
Edit this page
View Source
ValidateRequest()
Validates the request before execution.
Override in derived classes to implement request validation logic.
Declaration
protected override void ValidateRequest()
Overrides
Implements
Extension Methods