GoogleVertexSpeechTranscriptionModel
Namespace: Vercel.AI.Google
public sealed class GoogleVertexSpeechTranscriptionModel : ITranscriptionModelCloud Speech-to-Text recognize.
Inheritance: object
Implements: ITranscriptionModel
Constructors
Section titled “Constructors”GoogleVertexSpeechTranscriptionModel(GoogleVertexProvider, string)
Section titled “GoogleVertexSpeechTranscriptionModel(GoogleVertexProvider, string)”public GoogleVertexSpeechTranscriptionModel(GoogleVertexProvider provider, string modelId)Creates a transcription model.
Parameters
| Name | Type | Description |
|---|---|---|
provider |
GoogleVertexProvider | |
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”DoTranscribeAsync(AudioInput, CancellationToken)
Section titled “DoTranscribeAsync(AudioInput, CancellationToken)”public Task<TranscriptionResult> DoTranscribeAsync(AudioInput audio, CancellationToken cancellationToken)Transcribes audio.
Parameters
| Name | Type | Description |
|---|---|---|
audio |
AudioInput | |
cancellationToken |
CancellationToken |
Returns: Task<TranscriptionResult>
ParseDuration(string?)
Section titled “ParseDuration(string?)”public static double? ParseDuration(string? value)Parses a duration such as 1.200s.
Parameters
| Name | Type | Description |
|---|---|---|
value |
string |
Returns: double?
Request(string, byte[], string[]?)
Section titled “Request(string, byte[], string[]?)”public static JsonObject Request(string modelId, byte[] audio, string[]? languageCodes)Builds the recognize body. Audio bytes are base64-encoded.
Parameters
| Name | Type | Description |
|---|---|---|
modelId |
string | |
audio |
byte[] | |
languageCodes |
string[] |
Returns: JsonObject
ToIso6391(string?)
Section titled “ToIso6391(string?)”public static string? ToIso6391(string? tag)Maps a BCP-47 tag onto a two-letter ISO-639-1 code.
Parameters
| Name | Type | Description |
|---|---|---|
tag |
string |
Returns: string
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product