SpeechTextPart
Namespace: Vercel.AI.Operations
public sealed class SpeechTextPartOne piece of streamed input text. Consecutive parts are synthesized in order as one continuous script.
Maps to SpeechTextPart and SpeechModelV4StreamTextPart.
Inheritance: object
Constructors
Section titled “Constructors”SpeechTextPart(string, string?, JsonElement?)
Section titled “SpeechTextPart(string, string?, JsonElement?)”public SpeechTextPart(string text, string? voice = null, JsonElement? providerOptions = null)Creates a text part.
Parameters
| Name | Type | Description |
|---|---|---|
text |
string | |
voice |
string | |
providerOptions |
JsonElement? |
Properties
Section titled “Properties”ProviderOptions
Section titled “ProviderOptions”public JsonElement? ProviderOptions { get; }Additional provider-specific options for this part, keyed by provider name.
Value: JsonElement?
public string Text { get; }The text to synthesize. Parts may split anywhere, including mid-word.
Value: string
public string? Voice { get; }The voice that speaks this part (provider-specific, like the call’s voice). Defaults to the call’s voice. Single-voice providers fail the stream when it differs from the voice of the call.
Value: string
Operators
Section titled “Operators”implicit operator SpeechTextPart(string)
Section titled “implicit operator SpeechTextPart(string)”public static implicit operator SpeechTextPart(string text)Wraps a plain string as a text part.
Parameters
| Name | Type | Description |
|---|---|---|
text |
string |
Returns: SpeechTextPart
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product