Table of Contents

Class TranscriptionRequest

Namespace
Glitch9.AIDevKit

Task for converting speech audio into text (speech-to-text).

public class TranscriptionRequest : TranscriptionRequestBase<TranscriptionRequest, Transcript, ITranscriptionEvent>, IGenerativeRequest, ISequentialRequest
Inheritance
object
TranscriptionRequest
Implements
Inherited Members
Extension Methods

Constructors

TranscriptionRequest(Prompt<AudioClip>)

public TranscriptionRequest(Prompt<AudioClip> prompt)

Parameters

prompt Prompt<AudioClip>

Properties

MicrosoftTranscriptionApiType

public MicrosoftTypes.TranscriptionApi? MicrosoftTranscriptionApiType { get; set; }

Property Value

MicrosoftTypes.TranscriptionApi?

SpokenLanguage

public SystemLanguage SpokenLanguage { get; set; }

Property Value

SystemLanguage

SpokenLanguages

public List<SystemLanguage> SpokenLanguages { get; set; }

Property Value

List<SystemLanguage>

Temperature

public Temperature Temperature { get; set; }

Property Value

Temperature

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.

public string[] TimestampGranularities { get; set; }

Property Value

string[]

Remarks

Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency.

Type

public override FluentApiRequestType Type { get; }

Property Value

FluentApiRequestType

Methods

CreateStreamAsyncInternal()

protected override UniTask<IRESTStream<ITranscriptionEvent>> CreateStreamAsyncInternal()

Returns

UniTask<IRESTStream<ITranscriptionEvent>>

ExecuteAsyncInternal()

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.

protected override UniTask<Transcript> ExecuteAsyncInternal()

Returns

UniTask<Transcript>

SetMicrosoftTranscriptionApi(TranscriptionApi)

public TranscriptionRequest SetMicrosoftTranscriptionApi(MicrosoftTypes.TranscriptionApi apiType)

Parameters

apiType MicrosoftTypes.TranscriptionApi

Returns

TranscriptionRequest

SetSpokenLanguage(SystemLanguage)

Optionally sets the language hint to improve transcription accuracy.

public TranscriptionRequest SetSpokenLanguage(SystemLanguage language)

Parameters

language SystemLanguage

Returns

TranscriptionRequest

SetSpokenLanguages(params SystemLanguage[])

public TranscriptionRequest SetSpokenLanguages(params SystemLanguage[] languages)

Parameters

languages SystemLanguage[]

Returns

TranscriptionRequest

SetTimestampGranularities(params string[])

public TranscriptionRequest SetTimestampGranularities(params string[] granularities)

Parameters

granularities string[]

Returns

TranscriptionRequest