@responsivevoice/types
Shared TypeScript types, Zod schemas, and runtime type guards used across
the @responsivevoice/* packages. The Zod schemas are the single source of
truth for runtime validation; TypeScript types are inferred via z.infer<>.
Type Aliases
Section titled “Type Aliases”AudioFormat
Section titled “AudioFormat”type AudioFormat = z.infer<typeof AudioFormatSchema>;Defined in: src/schemas/core.ts:69
Inferred from AudioFormatSchema.
AudioResponse
Section titled “AudioResponse”type AudioResponse = z.infer<typeof AudioResponseSchema>;Defined in: src/schemas/synthesis.ts:146
Inferred from AudioResponseSchema.
AuthToken
Section titled “AuthToken”type AuthToken = z.infer<typeof AuthTokenSchema>;Defined in: src/schemas/website.ts:361
Inferred from AuthTokenSchema.
BrowserVoiceInfo
Section titled “BrowserVoiceInfo”type BrowserVoiceInfo = z.infer<typeof BrowserVoiceInfoSchema>;Defined in: src/schemas/responses.ts:43
Inferred from BrowserVoiceInfoSchema.
ByLanguageLinks
Section titled “ByLanguageLinks”type ByLanguageLinks = z.infer<typeof ByLanguageLinksSchema>;Defined in: src/schemas/responses.ts:244
Inferred from ByLanguageLinksSchema.
CollectionLinks
Section titled “CollectionLinks”type CollectionLinks = z.infer<typeof CollectionLinksSchema>;Defined in: src/schemas/responses.ts:231
Inferred from CollectionLinksSchema.
DeviceType
Section titled “DeviceType”type DeviceType = z.infer<typeof DeviceTypeSchema>;Defined in: src/schemas/responses.ts:18
Inferred from DeviceTypeSchema.
ErrorResponse
Section titled “ErrorResponse”type ErrorResponse = z.infer<typeof ErrorResponseSchema>;Defined in: src/schemas/responses.ts:133
Inferred from ErrorResponseSchema.
HrefLink
Section titled “HrefLink”type HrefLink = z.infer<typeof HrefLinkSchema>;Defined in: src/schemas/responses.ts:146
Inferred from HrefLinkSchema.
MiniPlayer
Section titled “MiniPlayer”type MiniPlayer = z.infer<typeof MiniPlayerSchema>;Defined in: src/schemas/website.ts:170
Inferred from MiniPlayerSchema.
MiniPlayerCorner
Section titled “MiniPlayerCorner”type MiniPlayerCorner = z.infer<typeof MiniPlayerCornerSchema>;Defined in: src/schemas/website.ts:122
Inferred from MiniPlayerCornerSchema.
MiniPlayerOffset
Section titled “MiniPlayerOffset”type MiniPlayerOffset = z.infer<typeof MiniPlayerOffsetSchema>;Defined in: src/schemas/website.ts:151
Inferred from MiniPlayerOffsetSchema.
PlatformReport
Section titled “PlatformReport”type PlatformReport = z.infer<typeof PlatformReportSchema>;Defined in: src/schemas/responses.ts:67
Inferred from PlatformReportSchema.
ProsodyKnob
Section titled “ProsodyKnob”type ProsodyKnob = typeof PROSODY_KNOBS[number];Defined in: src/schemas/prosody.ts:15
Inferred union from PROSODY_KNOBS.
RegexSelector
Section titled “RegexSelector”type RegexSelector = z.infer<typeof RegexSelectorSchema>;Defined in: src/schemas/voice-query.ts:58
Inferred from RegexSelectorSchema.
ResponsiveVoiceConfig
Section titled “ResponsiveVoiceConfig”type ResponsiveVoiceConfig = z.infer<typeof ResponsiveVoiceConfigSchema>;Defined in: src/schemas/synthesis.ts:190
Inferred from ResponsiveVoiceConfigSchema.
RVErrorEvent
Section titled “RVErrorEvent”type RVErrorEvent = z.infer<typeof RVErrorEventSchema>;Defined in: src/schemas/events.ts:46
Inferred from RVErrorEventSchema.
RVEvent
Section titled “RVEvent”type RVEvent = z.infer<typeof RVEventSchema>;Defined in: src/schemas/events.ts:21
Inferred from RVEventSchema.
RVEventCallback
Section titled “RVEventCallback”type RVEventCallback = (event) => void;Defined in: src/schemas/events.ts:31
Listener invoked by ResponsiveVoice for each dispatched RVEvent.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
event | RVEvent |
Returns
Section titled “Returns”void
RVEventType
Section titled “RVEventType”type RVEventType = z.infer<typeof RVEventTypeSchema>;Defined in: src/schemas/core.ts:142
Inferred from RVEventTypeSchema.
RVServiceSwitchedEvent
Section titled “RVServiceSwitchedEvent”type RVServiceSwitchedEvent = z.infer<typeof RVServiceSwitchedEventSchema>;Defined in: src/schemas/events.ts:68
Inferred from RVServiceSwitchedEventSchema.
ServiceOrNative
Section titled “ServiceOrNative”type ServiceOrNative = z.infer<typeof ServiceOrNativeSchema>;Defined in: src/schemas/events.ts:53
Inferred from ServiceOrNativeSchema.
SpeakParams
Section titled “SpeakParams”type SpeakParams = { onboundary?: (charIndex, name) => void; onend?: () => void; onerror?: (error) => void; onstart?: () => void; pitch?: number; prosodyFallback?: boolean; rate?: number; volume?: number;};Defined in: src/schemas/synthesis.ts:219
Parameters accepted by ResponsiveVoice.speak(). Controls pitch, rate,
volume, and the speech lifecycle event callbacks (onstart, onend,
onerror, onvoiceschanged, onboundary). Defined as a hand-authored
TypeScript type rather than z.infer<> so callback signatures stay
precise.
Properties
Section titled “Properties”onboundary?
Section titled “onboundary?”optional onboundary?: (charIndex, name) => void;Defined in: src/schemas/synthesis.ts:234
Called when speech crosses a word or sentence boundary
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
charIndex | number | Character index in the original text |
name | string | Type of boundary ('word' or 'sentence') |
Returns
Section titled “Returns”void
Remarks
Section titled “Remarks”Only supported by native Web Speech API engine, not fallback audio engine
onend?
Section titled “onend?”optional onend?: () => void;Defined in: src/schemas/synthesis.ts:226
Returns
Section titled “Returns”void
onerror?
Section titled “onerror?”optional onerror?: (error) => void;Defined in: src/schemas/synthesis.ts:227
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
error | Error |
Returns
Section titled “Returns”void
onstart?
Section titled “onstart?”optional onstart?: () => void;Defined in: src/schemas/synthesis.ts:225
Returns
Section titled “Returns”void
pitch?
Section titled “pitch?”optional pitch?: number;Defined in: src/schemas/synthesis.ts:220
prosodyFallback?
Section titled “prosodyFallback?”optional prosodyFallback?: boolean;Defined in: src/schemas/synthesis.ts:224
Per-call override for client-side prosody fallback. See ResponsiveVoiceConfigSchema for the default.
optional rate?: number;Defined in: src/schemas/synthesis.ts:221
volume?
Section titled “volume?”optional volume?: number;Defined in: src/schemas/synthesis.ts:222
SpeechParams
Section titled “SpeechParams”type SpeechParams = z.infer<typeof SpeechParamsSchema>;Defined in: src/schemas/synthesis.ts:50
Inferred from SpeechParamsSchema.
StreamAudioChunk
Section titled “StreamAudioChunk”type StreamAudioChunk = z.infer<typeof StreamAudioChunkSchema>;Defined in: src/schemas/streaming.ts:39
Inferred from StreamAudioChunkSchema.
StreamChunk
Section titled “StreamChunk”type StreamChunk = | StreamMetadata | StreamAudioChunk | StreamEnd | StreamError;Defined in: src/schemas/streaming.ts:70
Union of all streaming chunk types
StreamEnd
Section titled “StreamEnd”type StreamEnd = z.infer<typeof StreamEndSchema>;Defined in: src/schemas/streaming.ts:52
Inferred from StreamEndSchema.
StreamError
Section titled “StreamError”type StreamError = z.infer<typeof StreamErrorSchema>;Defined in: src/schemas/streaming.ts:65
Inferred from StreamErrorSchema.
StreamingTransportMode
Section titled “StreamingTransportMode”type StreamingTransportMode = z.infer<typeof StreamingTransportModeSchema>;Defined in: src/schemas/core.ts:173
Inferred from StreamingTransportModeSchema.
StreamMetadata
Section titled “StreamMetadata”type StreamMetadata = z.infer<typeof StreamMetadataSchema>;Defined in: src/schemas/streaming.ts:26
Inferred from StreamMetadataSchema.
StreamWebsocketLink
Section titled “StreamWebsocketLink”type StreamWebsocketLink = z.infer<typeof StreamWebsocketLinkSchema>;Defined in: src/schemas/responses.ts:193
Inferred from StreamWebsocketLinkSchema.
SynthesizeLink
Section titled “SynthesizeLink”type SynthesizeLink = z.infer<typeof SynthesizeLinkSchema>;Defined in: src/schemas/responses.ts:157
Inferred from SynthesizeLinkSchema.
SynthesizeRequest
Section titled “SynthesizeRequest”type SynthesizeRequest = z.infer<typeof SynthesizeRequestSchema>;Defined in: src/schemas/synthesis.ts:99
Inferred from SynthesizeRequestSchema.
SynthesizeResponse
Section titled “SynthesizeResponse”type SynthesizeResponse = z.infer<typeof SynthesizeResponseSchema>;Defined in: src/schemas/synthesis.ts:118
Inferred from SynthesizeResponseSchema.
SynthesizeStreamLink
Section titled “SynthesizeStreamLink”type SynthesizeStreamLink = z.infer<typeof SynthesizeStreamLinkSchema>;Defined in: src/schemas/responses.ts:177
Inferred from SynthesizeStreamLinkSchema.
SystemVoice
Section titled “SystemVoice”type SystemVoice = z.infer<typeof SystemVoiceSchema>;Defined in: src/schemas/voice.ts:91
Inferred from SystemVoiceSchema.
TextFeature
Section titled “TextFeature”type TextFeature = z.infer<typeof TextFeatureSchema>;Defined in: src/schemas/website.ts:29
Inferred from TextFeatureSchema.
ToggleFeature
Section titled “ToggleFeature”type ToggleFeature = z.infer<typeof ToggleFeatureSchema>;Defined in: src/schemas/website.ts:36
Inferred from ToggleFeatureSchema.
TransportMode
Section titled “TransportMode”type TransportMode = z.infer<typeof TransportModeSchema>;Defined in: src/schemas/core.ts:162
Inferred from TransportModeSchema.
TTSService
Section titled “TTSService”type TTSService = z.infer<typeof TTSServiceSchema>;Defined in: src/schemas/core.ts:56
Inferred from TTSServiceSchema.
type Voice = z.infer<typeof VoiceSchema>;Defined in: src/schemas/voice.ts:45
Inferred from VoiceSchema.
VoiceCollection
Section titled “VoiceCollection”type VoiceCollection = z.infer<typeof VoiceCollectionSchema>;Defined in: src/schemas/voice.ts:112
Inferred from VoiceCollectionSchema.
VoiceDetailLinks
Section titled “VoiceDetailLinks”type VoiceDetailLinks = z.infer<typeof VoiceDetailLinksSchema>;Defined in: src/schemas/responses.ts:219
Inferred from VoiceDetailLinksSchema.
VoiceDetailResponse
Section titled “VoiceDetailResponse”type VoiceDetailResponse = z.infer<typeof VoiceDetailResponseSchema>;Defined in: src/schemas/responses.ts:302
Inferred from VoiceDetailResponseSchema.
VoiceGender
Section titled “VoiceGender”type VoiceGender = z.infer<typeof VoiceGenderSchema>;Defined in: src/schemas/core.ts:26
Inferred from VoiceGenderSchema.
VoiceGenderShort
Section titled “VoiceGenderShort”type VoiceGenderShort = z.infer<typeof VoiceGenderShortSchema>;Defined in: src/schemas/core.ts:36
Inferred from VoiceGenderShortSchema.
VoiceLinks
Section titled “VoiceLinks”type VoiceLinks = z.infer<typeof VoiceLinksSchema>;Defined in: src/schemas/responses.ts:205
Inferred from VoiceLinksSchema.
VoiceQuery
Section titled “VoiceQuery”type VoiceQuery = z.infer<typeof VoiceQuerySchema>;Defined in: src/schemas/voice-query.ts:44
Inferred from VoiceQuerySchema.
VoiceReportRequest
Section titled “VoiceReportRequest”type VoiceReportRequest = z.infer<typeof VoiceReportRequestSchema>;Defined in: src/schemas/responses.ts:88
Inferred from VoiceReportRequestSchema.
VoiceReportResponse
Section titled “VoiceReportResponse”type VoiceReportResponse = z.infer<typeof VoiceReportResponseSchema>;Defined in: src/schemas/responses.ts:106
Inferred from VoiceReportResponseSchema.
VoicesByLanguageResponse
Section titled “VoicesByLanguageResponse”type VoicesByLanguageResponse = z.infer<typeof VoicesByLanguageResponseSchema>;Defined in: src/schemas/responses.ts:289
Inferred from VoicesByLanguageResponseSchema.
VoiceSelector
Section titled “VoiceSelector”type VoiceSelector = z.infer<typeof VoiceSelectorSchema>;Defined in: src/schemas/voice-query.ts:81
Post-parse output — what consumers (resolvers, server responses) see.
VoiceSelectorInput
Section titled “VoiceSelectorInput”type VoiceSelectorInput = | string | RegExp | RegexSelector | VoiceQuery;Defined in: src/schemas/voice-query.ts:86
Input form callers may write. JS callers can pass a real RegExp as
sugar for RegexSelector; the schema normalizes it on parse.
VoicesListResponse
Section titled “VoicesListResponse”type VoicesListResponse = z.infer<typeof VoicesListResponseSchema>;Defined in: src/schemas/responses.ts:274
Inferred from VoicesListResponseSchema.
VoiceWithLinks
Section titled “VoiceWithLinks”type VoiceWithLinks = z.infer<typeof VoiceWithLinksSchema>;Defined in: src/schemas/responses.ts:254
Inferred from VoiceWithLinksSchema.
WebPlayerControls
Section titled “WebPlayerControls”type WebPlayerControls = z.infer<typeof WebPlayerControlsSchema>;Defined in: src/schemas/website.ts:96
Inferred from WebPlayerControlsSchema.
WebPlayerFeature
Section titled “WebPlayerFeature”type WebPlayerFeature = z.infer<typeof WebPlayerFeatureSchema>;Defined in: src/schemas/website.ts:266
Inferred from WebPlayerFeatureSchema.
WebPlayerLayout
Section titled “WebPlayerLayout”type WebPlayerLayout = z.infer<typeof WebPlayerLayoutSchema>;Defined in: src/schemas/website.ts:185
Inferred from WebPlayerLayoutSchema.
WebPlayerNavigation
Section titled “WebPlayerNavigation”type WebPlayerNavigation = z.infer<typeof WebPlayerNavigationSchema>;Defined in: src/schemas/website.ts:112
Inferred from WebPlayerNavigationSchema.
WebPlayerSanitize
Section titled “WebPlayerSanitize”type WebPlayerSanitize = z.infer<typeof WebPlayerSanitizeSchema>;Defined in: src/schemas/website.ts:199
Inferred from WebPlayerSanitizeSchema.
WebPlayerTheme
Section titled “WebPlayerTheme”type WebPlayerTheme = z.infer<typeof WebPlayerThemeSchema>;Defined in: src/schemas/website.ts:75
Inferred from WebPlayerThemeSchema.
WebPlayerThemeTokens
Section titled “WebPlayerThemeTokens”type WebPlayerThemeTokens = z.infer<typeof WebPlayerThemeTokensSchema>;Defined in: src/schemas/website.ts:64
Inferred from WebPlayerThemeTokensSchema.
WebsiteAnalytics
Section titled “WebsiteAnalytics”type WebsiteAnalytics = z.infer<typeof WebsiteAnalyticsSchema>;Defined in: src/schemas/website.ts:346
Inferred from WebsiteAnalyticsSchema.
WebsiteConfigResponse
Section titled “WebsiteConfigResponse”type WebsiteConfigResponse = z.infer<typeof WebsiteConfigResponseSchema>;Defined in: src/schemas/website.ts:380
Inferred from WebsiteConfigResponseSchema.
WebsiteFeatures
Section titled “WebsiteFeatures”type WebsiteFeatures = z.infer<typeof WebsiteFeaturesSchema>;Defined in: src/schemas/website.ts:325
Inferred from WebsiteFeaturesSchema.
WebsiteVoice
Section titled “WebsiteVoice”type WebsiteVoice = z.infer<typeof WebsiteVoiceSchema>;Defined in: src/schemas/website.ts:337
Inferred from WebsiteVoiceSchema.
WelcomeMessageFeature
Section titled “WelcomeMessageFeature”type WelcomeMessageFeature = z.infer<typeof WelcomeMessageFeatureSchema>;Defined in: src/schemas/website.ts:21
Inferred from WelcomeMessageFeatureSchema.
Variables
Section titled “Variables”API_VERSION
Section titled “API_VERSION”const API_VERSION: "v2";Defined in: src/schemas/core.ts:12
Current API version used by the SDK and documented in OpenAPI
AUDIO_FORMATS
Section titled “AUDIO_FORMATS”const AUDIO_FORMATS: ("mp3" | "ogg" | "wav")[] = AudioFormatSchema.options;Defined in: src/schemas/core.ts:72
Valid audio format values for runtime validation
AudioFormatSchema
Section titled “AudioFormatSchema”const AudioFormatSchema: ZodEnum<{ mp3: "mp3"; ogg: "ogg"; wav: "wav";}>;Defined in: src/schemas/core.ts:64
Supported audio output formats
AudioResponseSchema
Section titled “AudioResponseSchema”const AudioResponseSchema: ZodObject<{ blob: ZodCustom<Blob, Blob>; duration: ZodOptional<ZodNumber>; format: ZodEnum<{ mp3: "mp3"; ogg: "ogg"; wav: "wav"; }>; prosodyApplied: ZodArray<ZodEnum<{ pitch: "pitch"; rate: "rate"; volume: "volume"; }>>; url: ZodString;}, $strip>;Defined in: src/schemas/synthesis.ts:123
Audio response wrapper with metadata
AuthTokenSchema
Section titled “AuthTokenSchema”const AuthTokenSchema: ZodObject<{ exp: ZodNumber; token: ZodString;}, $strip>;Defined in: src/schemas/website.ts:352
Short-lived bearer token returned by /v2/config. The SDK carries it as
Authorization: Bearer <token> on subsequent /v2/* requests. May be absent.
BrowserVoiceInfoSchema
Section titled “BrowserVoiceInfoSchema”const BrowserVoiceInfoSchema: ZodObject<{ default: ZodOptional<ZodBoolean>; lang: ZodString; localService: ZodBoolean; name: ZodString; voiceURI: ZodString;}, $strip>;Defined in: src/schemas/responses.ts:24
Browser voice information from Web Speech API Represents a SpeechSynthesisVoice as reported by the browser
ByLanguageLinksSchema
Section titled “ByLanguageLinksSchema”const ByLanguageLinksSchema: ZodObject<{ allVoices: ZodObject<{ href: ZodString; }, $strip>; self: ZodObject<{ href: ZodString; }, $strip>;}, $strip>;Defined in: src/schemas/responses.ts:234
Collection-level HATEOAS links on GET /v2/voices/by-language/{lang}.
CollectionLinksSchema
Section titled “CollectionLinksSchema”const CollectionLinksSchema: ZodObject<{ self: ZodObject<{ href: ZodString; }, $strip>;}, $strip>;Defined in: src/schemas/responses.ts:222
Collection-level HATEOAS links on GET /v2/voices.
DEFAULT_ENGINE_FORMAT
Section titled “DEFAULT_ENGINE_FORMAT”const DEFAULT_ENGINE_FORMAT: Record<TTSService, AudioFormat>;Defined in: src/schemas/core.ts:98
Default audio format for each TTS engine. Used when no explicit format is requested.
DEFAULT_WEBSITE_FEATURES
Section titled “DEFAULT_WEBSITE_FEATURES”const DEFAULT_WEBSITE_FEATURES: { accessibilityNavigation: { enabled: false; }; exitIntent: { enabled: false; text: null; }; paragraphNavigation: { enabled: false; }; speakEndPage: { enabled: false; text: null; }; speakInactivity: { enabled: false; text: null; }; speakLinks: { enabled: false; }; speakSelectedText: { enabled: false; }; webPlayer: { controls: { brand: true; progress: true; skip: true; speed: true; time: true; }; enabled: false; layout: { display: "block"; mode: "shrink"; }; miniPlayer: { animation: "slide"; enabled: true; position: "bottom-left"; }; navigation: { paragraphClick: true; paragraphHighlight: true; }; paragraphSelector: "p, h2, h3, li"; position: "before"; sanitize: { enabled: true; exclude: string[]; }; selector: "article"; theme: "neutral"; }; welcomeMessage: { enabled: false; text: null; }; welcomeMessageOnce: false;};Defined in: src/schemas/website.ts:269
Baseline defaults applied when a website config omits a feature flag.
Type Declaration
Section titled “Type Declaration”accessibilityNavigation
Section titled “accessibilityNavigation”readonly accessibilityNavigation: { enabled: false;};accessibilityNavigation.enabled
Section titled “accessibilityNavigation.enabled”readonly enabled: false = false;exitIntent
Section titled “exitIntent”readonly exitIntent: { enabled: false; text: null;};exitIntent.enabled
Section titled “exitIntent.enabled”readonly enabled: false = false;exitIntent.text
Section titled “exitIntent.text”readonly text: null = null;paragraphNavigation
Section titled “paragraphNavigation”readonly paragraphNavigation: { enabled: false;};paragraphNavigation.enabled
Section titled “paragraphNavigation.enabled”readonly enabled: false = false;speakEndPage
Section titled “speakEndPage”readonly speakEndPage: { enabled: false; text: null;};speakEndPage.enabled
Section titled “speakEndPage.enabled”readonly enabled: false = false;speakEndPage.text
Section titled “speakEndPage.text”readonly text: null = null;speakInactivity
Section titled “speakInactivity”readonly speakInactivity: { enabled: false; text: null;};speakInactivity.enabled
Section titled “speakInactivity.enabled”readonly enabled: false = false;speakInactivity.text
Section titled “speakInactivity.text”readonly text: null = null;speakLinks
Section titled “speakLinks”readonly speakLinks: { enabled: false;};speakLinks.enabled
Section titled “speakLinks.enabled”readonly enabled: false = false;speakSelectedText
Section titled “speakSelectedText”readonly speakSelectedText: { enabled: false;};speakSelectedText.enabled
Section titled “speakSelectedText.enabled”readonly enabled: false = false;webPlayer
Section titled “webPlayer”readonly webPlayer: { controls: { brand: true; progress: true; skip: true; speed: true; time: true; }; enabled: false; layout: { display: "block"; mode: "shrink"; }; miniPlayer: { animation: "slide"; enabled: true; position: "bottom-left"; }; navigation: { paragraphClick: true; paragraphHighlight: true; }; paragraphSelector: "p, h2, h3, li"; position: "before"; sanitize: { enabled: true; exclude: string[]; }; selector: "article"; theme: "neutral";};webPlayer.controls
Section titled “webPlayer.controls”readonly controls: { brand: true; progress: true; skip: true; speed: true; time: true;};webPlayer.controls.brand
Section titled “webPlayer.controls.brand”readonly brand: true = true;webPlayer.controls.progress
Section titled “webPlayer.controls.progress”readonly progress: true = true;webPlayer.controls.skip
Section titled “webPlayer.controls.skip”readonly skip: true = true;webPlayer.controls.speed
Section titled “webPlayer.controls.speed”readonly speed: true = true;webPlayer.controls.time
Section titled “webPlayer.controls.time”readonly time: true = true;webPlayer.enabled
Section titled “webPlayer.enabled”readonly enabled: false = false;webPlayer.layout
Section titled “webPlayer.layout”readonly layout: { display: "block"; mode: "shrink";};webPlayer.layout.display
Section titled “webPlayer.layout.display”readonly display: "block" = 'block';webPlayer.layout.mode
Section titled “webPlayer.layout.mode”readonly mode: "shrink" = 'shrink';webPlayer.miniPlayer
Section titled “webPlayer.miniPlayer”readonly miniPlayer: { animation: "slide"; enabled: true; position: "bottom-left";};webPlayer.miniPlayer.animation
Section titled “webPlayer.miniPlayer.animation”readonly animation: "slide" = 'slide';webPlayer.miniPlayer.enabled
Section titled “webPlayer.miniPlayer.enabled”readonly enabled: true = true;webPlayer.miniPlayer.position
Section titled “webPlayer.miniPlayer.position”readonly position: "bottom-left" = 'bottom-left';webPlayer.navigation
Section titled “webPlayer.navigation”readonly navigation: { paragraphClick: true; paragraphHighlight: true;};webPlayer.navigation.paragraphClick
Section titled “webPlayer.navigation.paragraphClick”readonly paragraphClick: true = true;webPlayer.navigation.paragraphHighlight
Section titled “webPlayer.navigation.paragraphHighlight”readonly paragraphHighlight: true = true;webPlayer.paragraphSelector
Section titled “webPlayer.paragraphSelector”readonly paragraphSelector: "p, h2, h3, li" = 'p, h2, h3, li';webPlayer.position
Section titled “webPlayer.position”readonly position: "before" = 'before';webPlayer.sanitize
Section titled “webPlayer.sanitize”readonly sanitize: { enabled: true; exclude: string[];};webPlayer.sanitize.enabled
Section titled “webPlayer.sanitize.enabled”readonly enabled: true = true;webPlayer.sanitize.exclude
Section titled “webPlayer.sanitize.exclude”readonly exclude: string[];webPlayer.selector
Section titled “webPlayer.selector”readonly selector: "article" = 'article';webPlayer.theme
Section titled “webPlayer.theme”readonly theme: "neutral" = 'neutral';welcomeMessage
Section titled “welcomeMessage”readonly welcomeMessage: { enabled: false; text: null;};welcomeMessage.enabled
Section titled “welcomeMessage.enabled”readonly enabled: false = false;welcomeMessage.text
Section titled “welcomeMessage.text”readonly text: null = null;welcomeMessageOnce
Section titled “welcomeMessageOnce”readonly welcomeMessageOnce: false = false;DeviceTypeSchema
Section titled “DeviceTypeSchema”const DeviceTypeSchema: ZodEnum<{ desktop: "desktop"; mobile: "mobile"; tablet: "tablet";}>;Defined in: src/schemas/responses.ts:16
Device type classification for voice reporting
ENGINE_SUPPORTED_FORMATS
Section titled “ENGINE_SUPPORTED_FORMATS”const ENGINE_SUPPORTED_FORMATS: Record<TTSService, readonly AudioFormat[]>;Defined in: src/schemas/core.ts:84
Supported audio formats per TTS engine.
- Free providers (g1, g2, g3) only produce MP3
- g5 only produces OGG
- BYOK providers support multiple formats via their native APIs:
- gwn (Google Cloud): MP3 and OGG_OPUS
- msv (Azure): MP3, OGG, and WAV
- oai (OpenAI): MP3, OGG (Opus), and WAV
ErrorResponseSchema
Section titled “ErrorResponseSchema”const ErrorResponseSchema: ZodObject<{ error: ZodObject<{ code: ZodOptional<ZodString>; errors: ZodOptional<ZodUnknown>; message: ZodString; statusCode: ZodNumber; }, $strip>;}, $strip>;Defined in: src/schemas/responses.ts:115
Standard API error response matching error-handler.ts format
EVENT_TYPES
Section titled “EVENT_TYPES”const EVENT_TYPES: ( | "OnLoad" | "OnReady" | "OnStart" | "OnEnd" | "OnError" | "OnPause" | "OnResume" | "OnServiceSwitched" | "OnClickEvent" | "OnAllowSpeechClicked" | "OnPartStart" | "OnPartEnd" | "OnVoiceResolved")[] = RVEventTypeSchema.options;Defined in: src/schemas/core.ts:145
Valid event type values for runtime validation
HrefLinkSchema
Section titled “HrefLinkSchema”const HrefLinkSchema: ZodObject<{ href: ZodString;}, $strip>;Defined in: src/schemas/responses.ts:140
Simple HATEOAS link with an absolute URL.
MiniPlayerCornerSchema
Section titled “MiniPlayerCornerSchema”const MiniPlayerCornerSchema: ZodEnum<{ bottom-left: "bottom-left"; bottom-right: "bottom-right"; top-left: "top-left"; top-right: "top-right";}>;Defined in: src/schemas/website.ts:115
Mini-player corner placement keywords.
MiniPlayerOffsetSchema
Section titled “MiniPlayerOffsetSchema”const MiniPlayerOffsetSchema: ZodObject<{ bottom: ZodOptional<ZodString>; left: ZodOptional<ZodString>; right: ZodOptional<ZodString>; top: ZodOptional<ZodString>;}, $strip>;Defined in: src/schemas/website.ts:129
Mini-player CSS-offset placement. Each side is a CSS length string
(e.g. '80px', '2rem', '5%'). At least one side is required;
top+bottom and left+right combinations are rejected.
MiniPlayerSchema
Section titled “MiniPlayerSchema”const MiniPlayerSchema: ZodObject<{ animation: ZodDefault<ZodEnum<{ fade: "fade"; none: "none"; pop: "pop"; slide: "slide"; }>>; enabled: ZodDefault<ZodBoolean>; position: ZodDefault<ZodUnion<readonly [ZodEnum<{ bottom-left: "bottom-left"; bottom-right: "bottom-right"; top-left: "top-left"; top-right: "top-right"; }>, ZodObject<{ bottom: ZodOptional<ZodString>; left: ZodOptional<ZodString>; right: ZodOptional<ZodString>; top: ZodOptional<ZodString>; }, $strip>]>>;}, $strip>;Defined in: src/schemas/website.ts:157
Mini-player configuration — visibility and viewport placement. position
accepts a corner keyword or an offset object; default is bottom-left.
PitchSchema
Section titled “PitchSchema”const PitchSchema: ZodNumber;Defined in: src/schemas/synthesis.ts:26
Voice pitch range (0–2; 1 = normal).
PlatformReportSchema
Section titled “PlatformReportSchema”const PlatformReportSchema: ZodObject<{ browser: ZodString; browserVersion: ZodString; deviceType: ZodOptional<ZodEnum<{ desktop: "desktop"; mobile: "mobile"; tablet: "tablet"; }>>; os: ZodString; osVersion: ZodString;}, $strip>;Defined in: src/schemas/responses.ts:48
Platform information for voice reporting
PROSODY_KNOBS
Section titled “PROSODY_KNOBS”const PROSODY_KNOBS: readonly ["pitch", "rate", "volume"];Defined in: src/schemas/prosody.ts:12
The complete set of prosody knobs the v2 API recognises. Order is stable and used for deterministic header formatting.
ProsodyAppliedHeaderSchema
Section titled “ProsodyAppliedHeaderSchema”const ProsodyAppliedHeaderSchema: ZodString;Defined in: src/schemas/prosody.ts:26
Wire shape for the RV-Prosody-Applied response header — a comma-separated
subset of the prosody knob alphabet, in any order. Empty string means the
server applied none of the requested knobs (client should run its own
fallback per its prosodyFallback policy).
ProsodyKnobSchema
Section titled “ProsodyKnobSchema”const ProsodyKnobSchema: ZodEnum<{ pitch: "pitch"; rate: "rate"; volume: "volume";}>;Defined in: src/schemas/prosody.ts:18
Zod enum over PROSODY_KNOBS.
RateSchema
Section titled “RateSchema”const RateSchema: ZodNumber;Defined in: src/schemas/synthesis.ts:28
Speech rate range (0–2; 1 = normal).
RegexSelectorSchema
Section titled “RegexSelectorSchema”const RegexSelectorSchema: ZodObject<{ flags: ZodOptional<ZodString>; regex: ZodString;}, $strip>;Defined in: src/schemas/voice-query.ts:51
JSON-serializable regex literal for VoiceSelectorSchema. Used in
place of a runtime RegExp so the selector can travel over the wire and
appear in OpenAPI / SDKs in every language.
ResponsiveVoiceConfigSchema
Section titled “ResponsiveVoiceConfigSchema”const ResponsiveVoiceConfigSchema: ZodObject<{ apiKey: ZodString; apiSecret: ZodOptional<ZodString>; baseUrl: ZodOptional<ZodString>; debug: ZodOptional<ZodBoolean>; defaultLang: ZodOptional<ZodString>; defaultVoice: ZodOptional<ZodString>; preferNative: ZodOptional<ZodBoolean>; retryAttempts: ZodOptional<ZodNumber>; timeout: ZodOptional<ZodNumber>;}, $strip>;Defined in: src/schemas/synthesis.ts:155
ResponsiveVoice client configuration
RVErrorEventSchema
Section titled “RVErrorEventSchema”const RVErrorEventSchema: ZodObject<{ code: ZodOptional<ZodString>; message: ZodString; timestamp: ZodNumber; type: ZodLiteral<"OnError">;}, $strip>;Defined in: src/schemas/events.ts:36
Error event with additional error information
RVEventCallbackSchema
Section titled “RVEventCallbackSchema”const RVEventCallbackSchema: ZodFunction<$ZodFunctionArgs, $ZodFunctionOut>;Defined in: src/schemas/events.ts:29
Runtime validator for event callbacks. See RVEventCallback for the TS signature.
RVEventSchema
Section titled “RVEventSchema”const RVEventSchema: ZodObject<{ timestamp: ZodNumber; type: ZodEnum<{ OnAllowSpeechClicked: "OnAllowSpeechClicked"; OnClickEvent: "OnClickEvent"; OnEnd: "OnEnd"; OnError: "OnError"; OnLoad: "OnLoad"; OnPartEnd: "OnPartEnd"; OnPartStart: "OnPartStart"; OnPause: "OnPause"; OnReady: "OnReady"; OnResume: "OnResume"; OnServiceSwitched: "OnServiceSwitched"; OnStart: "OnStart"; OnVoiceResolved: "OnVoiceResolved"; }>;}, $strip>;Defined in: src/schemas/events.ts:13
Base event interface
RVEventTypeSchema
Section titled “RVEventTypeSchema”const RVEventTypeSchema: ZodEnum<{ OnAllowSpeechClicked: "OnAllowSpeechClicked"; OnClickEvent: "OnClickEvent"; OnEnd: "OnEnd"; OnError: "OnError"; OnLoad: "OnLoad"; OnPartEnd: "OnPartEnd"; OnPartStart: "OnPartStart"; OnPause: "OnPause"; OnReady: "OnReady"; OnResume: "OnResume"; OnServiceSwitched: "OnServiceSwitched"; OnStart: "OnStart"; OnVoiceResolved: "OnVoiceResolved";}>;Defined in: src/schemas/core.ts:126
ResponsiveVoice event types
RVServiceSwitchedEventSchema
Section titled “RVServiceSwitchedEventSchema”const RVServiceSwitchedEventSchema: ZodObject<{ from: ZodUnion<readonly [ZodEnum<{ g1: "g1"; g2: "g2"; g3: "g3"; g5: "g5"; gwn: "gwn"; msv: "msv"; oai: "oai"; }>, ZodLiteral<"native">]>; timestamp: ZodNumber; to: ZodUnion<readonly [ZodEnum<{ g1: "g1"; g2: "g2"; g3: "g3"; g5: "g5"; gwn: "gwn"; msv: "msv"; oai: "oai"; }>, ZodLiteral<"native">]>; type: ZodLiteral<"OnServiceSwitched">;}, $strip>;Defined in: src/schemas/events.ts:58
Service switched event
ServiceOrNativeSchema
Section titled “ServiceOrNativeSchema”const ServiceOrNativeSchema: ZodUnion<readonly [ZodEnum<{ g1: "g1"; g2: "g2"; g3: "g3"; g5: "g5"; gwn: "gwn"; msv: "msv"; oai: "oai";}>, ZodLiteral<"native">]>;Defined in: src/schemas/events.ts:51
Service or native source for service switching
SpeakParamsSchema
Section titled “SpeakParamsSchema”const SpeakParamsSchema: ZodObject<{ onend: ZodOptional<ZodFunction<$ZodFunctionArgs, $ZodFunctionOut>>; onerror: ZodOptional<ZodFunction<$ZodFunctionArgs, $ZodFunctionOut>>; onstart: ZodOptional<ZodFunction<$ZodFunctionArgs, $ZodFunctionOut>>; pitch: ZodOptional<ZodNumber>; prosodyFallback: ZodOptional<ZodBoolean>; rate: ZodOptional<ZodNumber>; volume: ZodOptional<ZodNumber>;}, $strip>;Defined in: src/schemas/synthesis.ts:195
Speech parameters for speak() method
SpeechParamsSchema
Section titled “SpeechParamsSchema”const SpeechParamsSchema: ZodObject<{ pitch: ZodOptional<ZodNumber>; rate: ZodOptional<ZodNumber>; volume: ZodOptional<ZodNumber>;}, $strip>;Defined in: src/schemas/synthesis.ts:41
Numeric speech parameters as a reusable, all-optional shape. Spread via
...SpeechParamsSchema.shape into any schema that wants pitch / rate
/ volume overrides — SynthesizeRequestSchema, SpeakParamsSchema,
WebPlayerFeatureSchema, and any future consumer. Field-level
documentation lives here so the constraints and the meaning live in one
place; consumer comments only describe context-specific behavior (e.g.
"inherits website default when omitted").
StreamAudioChunkSchema
Section titled “StreamAudioChunkSchema”const StreamAudioChunkSchema: ZodObject<{ chunkIndex: ZodNumber; data: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; type: ZodLiteral<"audio">;}, $strip>;Defined in: src/schemas/streaming.ts:31
A chunk of audio data from the stream
StreamEndSchema
Section titled “StreamEndSchema”const StreamEndSchema: ZodObject<{ totalBytes: ZodNumber; totalChunks: ZodNumber; type: ZodLiteral<"end">;}, $strip>;Defined in: src/schemas/streaming.ts:44
End-of-stream marker with summary statistics
StreamErrorSchema
Section titled “StreamErrorSchema”const StreamErrorSchema: ZodObject<{ message: ZodString; retryable: ZodBoolean; type: ZodLiteral<"error">;}, $strip>;Defined in: src/schemas/streaming.ts:57
Stream error event
STREAMING_ACCEPT_TYPE
Section titled “STREAMING_ACCEPT_TYPE”const STREAMING_ACCEPT_TYPE: "text/event-stream";Defined in: src/schemas/core.ts:186
The Accept header value that clients MUST send for streaming synthesis requests.
Used by both the client (to set the header) and the server (to validate it).
This acts as a protocol-level signal alongside stream: true in the body,
enabling infrastructure (e.g. Traefik) to route streaming requests correctly
and providing defense-in-depth against forged requests.
StreamingTransportModeSchema
Section titled “StreamingTransportModeSchema”const StreamingTransportModeSchema: ZodEnum<{ stream: "stream"; websocket: "websocket";}>;Defined in: src/schemas/core.ts:171
Streaming-only transport modes (excludes 'chunks'). Used when MSE progressive playback is required.
StreamMetadataSchema
Section titled “StreamMetadataSchema”const StreamMetadataSchema: ZodObject<{ contentType: ZodString; prosodyApplied: ZodArray<ZodEnum<{ pitch: "pitch"; rate: "rate"; volume: "volume"; }>>; type: ZodLiteral<"metadata">;}, $strip>;Defined in: src/schemas/streaming.ts:15
Metadata about a streaming synthesis session. First chunk emitted when streaming begins.
StreamWebsocketLinkSchema
Section titled “StreamWebsocketLinkSchema”const StreamWebsocketLinkSchema: ZodObject<{ href: ZodString; message: ZodObject<{ lang: ZodOptional<ZodString>; type: ZodString; voice: ZodString; }, $strip>; premium: ZodBoolean; protocol: ZodLiteral<"websocket">;}, $strip>;Defined in: src/schemas/responses.ts:180
WebSocket stream action link.
SynthesizeLinkSchema
Section titled “SynthesizeLinkSchema”const SynthesizeLinkSchema: ZodObject<{ body: ZodObject<{ lang: ZodOptional<ZodString>; voice: ZodString; }, $strip>; href: ZodString; method: ZodLiteral<"POST">;}, $strip>;Defined in: src/schemas/responses.ts:149
Synthesize action link on a voice resource.
SynthesizeRequestSchema
Section titled “SynthesizeRequestSchema”const SynthesizeRequestSchema: ZodObject<{ engine: ZodOptional<ZodEnum<{ g1: "g1"; g2: "g2"; g3: "g3"; g5: "g5"; gwn: "gwn"; msv: "msv"; oai: "oai"; }>>; format: ZodOptional<ZodEnum<{ mp3: "mp3"; ogg: "ogg"; wav: "wav"; }>>; gender: ZodOptional<ZodEnum<{ female: "female"; male: "male"; }>>; lang: ZodOptional<ZodString>; name: ZodOptional<ZodString>; pitch: ZodOptional<ZodNumber>; rate: ZodOptional<ZodNumber>; text: ZodString; voice: ZodOptional<ZodString>; volume: ZodOptional<ZodNumber>;}, $strip>;Defined in: src/schemas/synthesis.ts:59
Request parameters for text-to-speech synthesis
SynthesizeResponseSchema
Section titled “SynthesizeResponseSchema”const SynthesizeResponseSchema: ZodObject<{ audio: ZodCustom<ArrayBuffer, ArrayBuffer>; contentType: ZodString; duration: ZodOptional<ZodNumber>; size: ZodNumber;}, $strip>;Defined in: src/schemas/synthesis.ts:104
Response from text-to-speech synthesis
SynthesizeStreamLinkSchema
Section titled “SynthesizeStreamLinkSchema”const SynthesizeStreamLinkSchema: ZodObject<{ accept: ZodLiteral<"text/event-stream">; body: ZodObject<{ lang: ZodOptional<ZodString>; stream: ZodBoolean; voice: ZodString; }, $strip>; href: ZodString; method: ZodLiteral<"POST">; premium: ZodBoolean;}, $strip>;Defined in: src/schemas/responses.ts:160
Streaming synthesize action link (HTTP audio streaming).
SystemVoiceSchema
Section titled “SystemVoiceSchema”const SystemVoiceSchema: ZodObject<{ deprecated: ZodOptional<ZodBoolean>; fallbackVoice: ZodOptional<ZodBoolean>; gender: ZodOptional<ZodString>; id: ZodNumber; lang: ZodOptional<ZodString>; name: ZodString; pitch: ZodOptional<ZodNumber>; rate: ZodOptional<ZodNumber>; service: ZodOptional<ZodEnum<{ g1: "g1"; g2: "g2"; g3: "g3"; g5: "g5"; gwn: "gwn"; msv: "msv"; oai: "oai"; }>>; timerSpeed: ZodOptional<ZodNumber>; voiceName: ZodOptional<ZodString>; volume: ZodOptional<ZodNumber>;}, $strip>;Defined in: src/schemas/voice.ts:51
Low-level system voice mapping Represents the actual TTS voice configuration
TextFeatureSchema
Section titled “TextFeatureSchema”const TextFeatureSchema: ZodObject<{ enabled: ZodDefault<ZodBoolean>; text: ZodDefault<ZodNullable<ZodString>>;}, $strip>;Defined in: src/schemas/website.ts:24
Feature toggle with optional custom text (speakInactivity, speakEndPage, exitIntent).
ToggleFeatureSchema
Section titled “ToggleFeatureSchema”const ToggleFeatureSchema: ZodObject<{ enabled: ZodDefault<ZodBoolean>;}, $strip>;Defined in: src/schemas/website.ts:32
Simple on/off feature toggle without custom text (speakSelectedText, speakLinks, etc.).
TRANSPORT_MODES
Section titled “TRANSPORT_MODES”const TRANSPORT_MODES: ("chunks" | "stream" | "websocket")[] = TransportModeSchema.options;Defined in: src/schemas/core.ts:165
Valid transport mode values for runtime validation
TransportModeSchema
Section titled “TransportModeSchema”const TransportModeSchema: ZodEnum<{ chunks: "chunks"; stream: "stream"; websocket: "websocket";}>;Defined in: src/schemas/core.ts:157
Audio transport mode for fallback (HTTP) voices.
'chunks'(default): full download per text chunk, then play'stream': HTTP audio streaming with MSE progressive playback'websocket': persistent WebSocket connection with MSE progressive playback
TTS_SERVICES
Section titled “TTS_SERVICES”const TTS_SERVICES: ("g1" | "g2" | "g3" | "g5" | "gwn" | "msv" | "oai")[] = TTSServiceSchema.options;Defined in: src/schemas/core.ts:59
Valid TTS service values for runtime validation
TTSServiceSchema
Section titled “TTSServiceSchema”const TTSServiceSchema: ZodEnum<{ g1: "g1"; g2: "g2"; g3: "g3"; g5: "g5"; gwn: "gwn"; msv: "msv"; oai: "oai";}>;Defined in: src/schemas/core.ts:51
Available TTS service backends
- g1: Primary fallback service
- g2: Secondary fallback service
- g3: Male voice fallbacks
- g5: Specialty languages (Armenian, Esperanto, Macedonian, Welsh)
- gwn: Google Cloud WaveNet (premium, requires BYOK credentials)
- msv: Microsoft Azure Speech (premium, requires BYOK credentials)
- oai: OpenAI TTS (premium, requires BYOK credentials)
VERSION
Section titled “VERSION”const VERSION: string;Defined in: src/version.ts:14
Package version, the source of truth for the OpenAPI contract version.
VOICE_GENDERS
Section titled “VOICE_GENDERS”const VOICE_GENDERS: ("male" | "female")[] = VoiceGenderSchema.options;Defined in: src/schemas/core.ts:29
Valid voice gender values for runtime validation
VOICE_GENDERS_SHORT
Section titled “VOICE_GENDERS_SHORT”const VOICE_GENDERS_SHORT: ("f" | "m")[] = VoiceGenderShortSchema.options;Defined in: src/schemas/core.ts:39
Valid short gender values for runtime validation
VoiceCollectionSchema
Section titled “VoiceCollectionSchema”const VoiceCollectionSchema: ZodObject<{ lastUpdated: ZodString; systemVoices: ZodArray<ZodObject<{ deprecated: ZodOptional<ZodBoolean>; fallbackVoice: ZodOptional<ZodBoolean>; gender: ZodOptional<ZodString>; id: ZodNumber; lang: ZodOptional<ZodString>; name: ZodString; pitch: ZodOptional<ZodNumber>; rate: ZodOptional<ZodNumber>; service: ZodOptional<ZodEnum<{ g1: "g1"; g2: "g2"; g3: "g3"; g5: "g5"; gwn: "gwn"; msv: "msv"; oai: "oai"; }>>; timerSpeed: ZodOptional<ZodNumber>; voiceName: ZodOptional<ZodString>; volume: ZodOptional<ZodNumber>; }, $strip>>; version: ZodString; voices: ZodArray<ZodObject<{ deprecated: ZodOptional<ZodBoolean>; flag: ZodString; gender: ZodEnum<{ f: "f"; m: "m"; }>; isByok: ZodOptional<ZodBoolean>; lang: ZodString; name: ZodString; provider: ZodOptional<ZodString>; voiceIDs: ZodArray<ZodNumber>; }, $strip>>;}, $strip>;Defined in: src/schemas/voice.ts:96
Complete voice collection containing all voices
VoiceDetailLinksSchema
Section titled “VoiceDetailLinksSchema”const VoiceDetailLinksSchema: ZodObject<{ byLanguage: ZodObject<{ href: ZodString; }, $strip>; collection: ZodObject<{ href: ZodString; }, $strip>; self: ZodObject<{ href: ZodString; }, $strip>; stream:websocket: ZodObject<{ href: ZodString; message: ZodObject<{ lang: ZodOptional<ZodString>; type: ZodString; voice: ZodString; }, $strip>; premium: ZodBoolean; protocol: ZodLiteral<"websocket">; }, $strip>; synthesize: ZodObject<{ body: ZodObject<{ lang: ZodOptional<ZodString>; voice: ZodString; }, $strip>; href: ZodString; method: ZodLiteral<"POST">; }, $strip>; synthesize:stream: ZodObject<{ accept: ZodLiteral<"text/event-stream">; body: ZodObject<{ lang: ZodOptional<ZodString>; stream: ZodBoolean; voice: ZodString; }, $strip>; href: ZodString; method: ZodLiteral<"POST">; premium: ZodBoolean; }, $strip>;}, $strip>;Defined in: src/schemas/responses.ts:211
Voice-detail HATEOAS links: voice-level links plus navigation back to the
collection and the by-language list (only present on GET /v2/voices/{name}).
VoiceDetailResponseSchema
Section titled “VoiceDetailResponseSchema”const VoiceDetailResponseSchema: ZodObject<{ _links: ZodObject<{ byLanguage: ZodObject<{ href: ZodString; }, $strip>; collection: ZodObject<{ href: ZodString; }, $strip>; self: ZodObject<{ href: ZodString; }, $strip>; stream:websocket: ZodObject<{ href: ZodString; message: ZodObject<{ lang: ZodOptional<ZodString>; type: ZodString; voice: ZodString; }, $strip>; premium: ZodBoolean; protocol: ZodLiteral<"websocket">; }, $strip>; synthesize: ZodObject<{ body: ZodObject<{ lang: ZodOptional<ZodString>; voice: ZodString; }, $strip>; href: ZodString; method: ZodLiteral<"POST">; }, $strip>; synthesize:stream: ZodObject<{ accept: ZodLiteral<"text/event-stream">; body: ZodObject<{ lang: ZodOptional<ZodString>; stream: ZodBoolean; voice: ZodString; }, $strip>; href: ZodString; method: ZodLiteral<"POST">; premium: ZodBoolean; }, $strip>; }, $strip>; voice: ZodObject<{ deprecated: ZodOptional<ZodBoolean>; flag: ZodString; gender: ZodEnum<{ f: "f"; m: "m"; }>; isByok: ZodOptional<ZodBoolean>; lang: ZodString; name: ZodString; provider: ZodOptional<ZodString>; voiceIDs: ZodArray<ZodNumber>; }, $strip>;}, $strip>;Defined in: src/schemas/responses.ts:292
Response body for GET /v2/voices/{name}.
VoiceGenderSchema
Section titled “VoiceGenderSchema”const VoiceGenderSchema: ZodEnum<{ female: "female"; male: "male";}>;Defined in: src/schemas/core.ts:21
Voice gender classification
VoiceGenderShortSchema
Section titled “VoiceGenderShortSchema”const VoiceGenderShortSchema: ZodEnum<{ f: "f"; m: "m";}>;Defined in: src/schemas/core.ts:34
Short form gender used internally
VoiceLinksSchema
Section titled “VoiceLinksSchema”const VoiceLinksSchema: ZodObject<{ self: ZodObject<{ href: ZodString; }, $strip>; stream:websocket: ZodObject<{ href: ZodString; message: ZodObject<{ lang: ZodOptional<ZodString>; type: ZodString; voice: ZodString; }, $strip>; premium: ZodBoolean; protocol: ZodLiteral<"websocket">; }, $strip>; synthesize: ZodObject<{ body: ZodObject<{ lang: ZodOptional<ZodString>; voice: ZodString; }, $strip>; href: ZodString; method: ZodLiteral<"POST">; }, $strip>; synthesize:stream: ZodObject<{ accept: ZodLiteral<"text/event-stream">; body: ZodObject<{ lang: ZodOptional<ZodString>; stream: ZodBoolean; voice: ZodString; }, $strip>; href: ZodString; method: ZodLiteral<"POST">; premium: ZodBoolean; }, $strip>;}, $strip>;Defined in: src/schemas/responses.ts:196
Voice-level HATEOAS links present on every voice in an API response.
VoiceQuerySchema
Section titled “VoiceQuerySchema”const VoiceQuerySchema: ZodObject<{ gender: ZodOptional<ZodEnum<{ f: "f"; female: "female"; m: "m"; male: "male"; }>>; isByok: ZodOptional<ZodBoolean>; lang: ZodOptional<ZodString>; name: ZodOptional<ZodString>; provider: ZodOptional<ZodString>;}, $strip>;Defined in: src/schemas/voice-query.ts:26
Declarative voice selection query. All conditions are AND — a voice must match every specified field.
Examples
Section titled “Examples”// Select Portuguese female voice{ lang: "pt", gender: "female" }// Select a specific BYOK WaveNet voice{ lang: "en-GB", gender: "m", provider: "Google Cloud WaveNet", name: "Wavenet-A" }VoiceReportRequestSchema
Section titled “VoiceReportRequestSchema”const VoiceReportRequestSchema: ZodObject<{ platform: ZodObject<{ browser: ZodString; browserVersion: ZodString; deviceType: ZodOptional<ZodEnum<{ desktop: "desktop"; mobile: "mobile"; tablet: "tablet"; }>>; os: ZodString; osVersion: ZodString; }, $strip>; sdkVersion: ZodOptional<ZodString>; timestamp: ZodISODateTime; voices: ZodArray<ZodObject<{ default: ZodOptional<ZodBoolean>; lang: ZodString; localService: ZodBoolean; name: ZodString; voiceURI: ZodString; }, $strip>>;}, $strip>;Defined in: src/schemas/responses.ts:72
Voice report request - sent by client to report available browser voices
VoiceReportResponseSchema
Section titled “VoiceReportResponseSchema”const VoiceReportResponseSchema: ZodObject<{ count: ZodNumber; systemVoices: ZodArray<ZodObject<{ deprecated: ZodOptional<ZodBoolean>; fallbackVoice: ZodOptional<ZodBoolean>; gender: ZodOptional<ZodString>; id: ZodNumber; lang: ZodOptional<ZodString>; name: ZodString; pitch: ZodOptional<ZodNumber>; rate: ZodOptional<ZodNumber>; service: ZodOptional<ZodEnum<{ g1: "g1"; g2: "g2"; g3: "g3"; g5: "g5"; gwn: "gwn"; msv: "msv"; oai: "oai"; }>>; timerSpeed: ZodOptional<ZodNumber>; voiceName: ZodOptional<ZodString>; volume: ZodOptional<ZodNumber>; }, $strip>>; voices: ZodArray<ZodObject<{ deprecated: ZodOptional<ZodBoolean>; flag: ZodString; gender: ZodEnum<{ f: "f"; m: "m"; }>; isByok: ZodOptional<ZodBoolean>; lang: ZodString; name: ZodString; provider: ZodOptional<ZodString>; voiceIDs: ZodArray<ZodNumber>; }, $strip>>;}, $strip>;Defined in: src/schemas/responses.ts:93
Voice report response - returns personalized voice collection
VoicesByLanguageResponseSchema
Section titled “VoicesByLanguageResponseSchema”const VoicesByLanguageResponseSchema: ZodObject<{ _links: ZodObject<{ allVoices: ZodObject<{ href: ZodString; }, $strip>; self: ZodObject<{ href: ZodString; }, $strip>; }, $strip>; count: ZodNumber; language: ZodString; voices: ZodArray<ZodObject<{ _links: ZodObject<{ self: ZodObject<{ href: ZodString; }, $strip>; stream:websocket: ZodObject<{ href: ZodString; message: ZodObject<{ lang: ...; type: ...; voice: ...; }, $strip>; premium: ZodBoolean; protocol: ZodLiteral<"websocket">; }, $strip>; synthesize: ZodObject<{ body: ZodObject<{ lang: ...; voice: ...; }, $strip>; href: ZodString; method: ZodLiteral<"POST">; }, $strip>; synthesize:stream: ZodObject<{ accept: ZodLiteral<"text/event-stream">; body: ZodObject<{ lang: ...; stream: ...; voice: ...; }, $strip>; href: ZodString; method: ZodLiteral<"POST">; premium: ZodBoolean; }, $strip>; }, $strip>; deprecated: ZodOptional<ZodBoolean>; flag: ZodString; gender: ZodEnum<{ f: "f"; m: "m"; }>; isByok: ZodOptional<ZodBoolean>; lang: ZodString; name: ZodString; provider: ZodOptional<ZodString>; voiceIDs: ZodArray<ZodNumber>; }, $strip>>;}, $strip>;Defined in: src/schemas/responses.ts:277
Response body for GET /v2/voices/by-language/{lang}.
VoiceSchema
Section titled “VoiceSchema”const VoiceSchema: ZodObject<{ deprecated: ZodOptional<ZodBoolean>; flag: ZodString; gender: ZodEnum<{ f: "f"; m: "m"; }>; isByok: ZodOptional<ZodBoolean>; lang: ZodString; name: ZodString; provider: ZodOptional<ZodString>; voiceIDs: ZodArray<ZodNumber>;}, $strip>;Defined in: src/schemas/voice.ts:17
High-level ResponsiveVoice voice definition Represents a user-facing voice option
VoiceSelectorSchema
Section titled “VoiceSelectorSchema”const VoiceSelectorSchema: ZodPreprocess<ZodUnion<readonly [ZodString, ZodObject<{ flags: ZodOptional<ZodString>; regex: ZodString;}, $strip>, ZodObject<{ gender: ZodOptional<ZodEnum<{ f: "f"; female: "female"; m: "m"; male: "male"; }>>; isByok: ZodOptional<ZodBoolean>; lang: ZodOptional<ZodString>; name: ZodOptional<ZodString>; provider: ZodOptional<ZodString>;}, $strip>]>>;Defined in: src/schemas/voice-query.ts:76
Voice selector — declarative grammar for choosing a voice. Three forms after parsing, all JSON-serializable so the same shape works in JS, every SDK language, and server payloads:
string— exact name match (e.g.'UK English Female').- VoiceQuery — structured AND-filter (e.g.
{ lang: 'pt', gender: 'female' }). - RegexSelector —
{ regex, flags? }for pattern matching.
In JS the schema also accepts a real RegExp as input — a preprocess
step normalizes it to the RegexSelector literal form before
validation, so the post-parse output is always JSON-clean. The OpenAPI
emit only describes the three wire forms (the preprocess is invisible to
the schema description), so non-JS SDK consumers get a clean oneOf
without a phantom RegExp branch.
VoicesListResponseSchema
Section titled “VoicesListResponseSchema”const VoicesListResponseSchema: ZodObject<{ _links: ZodObject<{ self: ZodObject<{ href: ZodString; }, $strip>; }, $strip>; count: ZodNumber; systemVoices: ZodArray<ZodObject<{ deprecated: ZodOptional<ZodBoolean>; fallbackVoice: ZodOptional<ZodBoolean>; gender: ZodOptional<ZodString>; id: ZodNumber; lang: ZodOptional<ZodString>; name: ZodString; pitch: ZodOptional<ZodNumber>; rate: ZodOptional<ZodNumber>; service: ZodOptional<ZodEnum<{ g1: "g1"; g2: "g2"; g3: "g3"; g5: "g5"; gwn: "gwn"; msv: "msv"; oai: "oai"; }>>; timerSpeed: ZodOptional<ZodNumber>; voiceName: ZodOptional<ZodString>; volume: ZodOptional<ZodNumber>; }, $strip>>; voices: ZodArray<ZodObject<{ _links: ZodObject<{ self: ZodObject<{ href: ZodString; }, $strip>; stream:websocket: ZodObject<{ href: ZodString; message: ZodObject<{ lang: ...; type: ...; voice: ...; }, $strip>; premium: ZodBoolean; protocol: ZodLiteral<"websocket">; }, $strip>; synthesize: ZodObject<{ body: ZodObject<{ lang: ...; voice: ...; }, $strip>; href: ZodString; method: ZodLiteral<"POST">; }, $strip>; synthesize:stream: ZodObject<{ accept: ZodLiteral<"text/event-stream">; body: ZodObject<{ lang: ...; stream: ...; voice: ...; }, $strip>; href: ZodString; method: ZodLiteral<"POST">; premium: ZodBoolean; }, $strip>; }, $strip>; deprecated: ZodOptional<ZodBoolean>; flag: ZodString; gender: ZodEnum<{ f: "f"; m: "m"; }>; isByok: ZodOptional<ZodBoolean>; lang: ZodString; name: ZodString; provider: ZodOptional<ZodString>; voiceIDs: ZodArray<ZodNumber>; }, $strip>>;}, $strip>;Defined in: src/schemas/responses.ts:262
Response body for GET /v2/voices.
VoiceWithLinksSchema
Section titled “VoiceWithLinksSchema”const VoiceWithLinksSchema: ZodObject<{ _links: ZodObject<{ self: ZodObject<{ href: ZodString; }, $strip>; stream:websocket: ZodObject<{ href: ZodString; message: ZodObject<{ lang: ZodOptional<ZodString>; type: ZodString; voice: ZodString; }, $strip>; premium: ZodBoolean; protocol: ZodLiteral<"websocket">; }, $strip>; synthesize: ZodObject<{ body: ZodObject<{ lang: ZodOptional<ZodString>; voice: ZodString; }, $strip>; href: ZodString; method: ZodLiteral<"POST">; }, $strip>; synthesize:stream: ZodObject<{ accept: ZodLiteral<"text/event-stream">; body: ZodObject<{ lang: ZodOptional<ZodString>; stream: ZodBoolean; voice: ZodString; }, $strip>; href: ZodString; method: ZodLiteral<"POST">; premium: ZodBoolean; }, $strip>; }, $strip>; deprecated: ZodOptional<ZodBoolean>; flag: ZodString; gender: ZodEnum<{ f: "f"; m: "m"; }>; isByok: ZodOptional<ZodBoolean>; lang: ZodString; name: ZodString; provider: ZodOptional<ZodString>; voiceIDs: ZodArray<ZodNumber>;}, $strip>;Defined in: src/schemas/responses.ts:247
Voice resource as returned by API endpoints — core voice fields plus HATEOAS links.
VolumeSchema
Section titled “VolumeSchema”const VolumeSchema: ZodNumber;Defined in: src/schemas/synthesis.ts:30
Volume range (0–1; 1 = full).
WebPlayerControlsSchema
Section titled “WebPlayerControlsSchema”const WebPlayerControlsSchema: ZodObject<{ brand: ZodDefault<ZodBoolean>; progress: ZodDefault<ZodBoolean>; skip: ZodDefault<ZodBoolean>; speed: ZodDefault<ZodBoolean>; time: ZodDefault<ZodBoolean>;}, $strip>;Defined in: src/schemas/website.ts:83
Toggles for the player's in-line controls. The play / pause button is
always shown — without it the widget is not a player. skip pairs the
skip-back and skip-forward buttons together because hiding one but not
the other looks visually broken in the reference design.
WebPlayerFeatureSchema
Section titled “WebPlayerFeatureSchema”const WebPlayerFeatureSchema: ZodObject<{ controls: ZodDefault<ZodObject<{ brand: ZodDefault<ZodBoolean>; progress: ZodDefault<ZodBoolean>; skip: ZodDefault<ZodBoolean>; speed: ZodDefault<ZodBoolean>; time: ZodDefault<ZodBoolean>; }, $strip>>; enabled: ZodDefault<ZodBoolean>; layout: ZodDefault<ZodObject<{ display: ZodDefault<ZodEnum<{ block: "block"; inline: "inline"; }>>; mode: ZodDefault<ZodEnum<{ fill: "fill"; shrink: "shrink"; }>>; }, $strip>>; miniPlayer: ZodDefault<ZodPreprocess<ZodObject<{ animation: ZodDefault<ZodEnum<{ fade: "fade"; none: "none"; pop: "pop"; slide: "slide"; }>>; enabled: ZodDefault<ZodBoolean>; position: ZodDefault<ZodUnion<readonly [ZodEnum<{ bottom-left: ...; bottom-right: ...; top-left: ...; top-right: ...; }>, ZodObject<{ bottom: ...; left: ...; right: ...; top: ...; }, $strip>]>>; }, $strip>>>; navigation: ZodDefault<ZodObject<{ paragraphClick: ZodDefault<ZodBoolean>; paragraphHighlight: ZodDefault<ZodBoolean>; }, $strip>>; paragraphSelector: ZodDefault<ZodString>; pitch: ZodOptional<ZodNumber>; position: ZodDefault<ZodUnion<readonly [ZodEnum<{ after: "after"; before: "before"; inline: "inline"; }>, ZodObject<{ at: ZodDefault<ZodEnum<{ after: "after"; before: "before"; inside: "inside"; }>>; target: ZodString; }, $strip>]>>; rate: ZodOptional<ZodNumber>; sanitize: ZodDefault<ZodObject<{ enabled: ZodDefault<ZodBoolean>; exclude: ZodDefault<ZodArray<ZodString>>; }, $strip>>; selector: ZodDefault<ZodString>; theme: ZodDefault<ZodUnion<readonly [ZodEnum<{ neutral: "neutral"; responsivevoice: "responsivevoice"; }>, ZodObject<{ accent: ZodOptional<ZodString>; accentSoft: ZodOptional<ZodString>; bg: ZodOptional<ZodString>; border: ZodOptional<ZodString>; fg: ZodOptional<ZodString>; fill: ZodOptional<ZodString>; hover: ZodOptional<ZodString>; muted: ZodOptional<ZodString>; track: ZodOptional<ZodString>; }, $strip>]>>; voice: ZodOptional<ZodPreprocess<ZodUnion<readonly [ZodString, ZodObject<{ flags: ZodOptional<ZodString>; regex: ZodString; }, $strip>, ZodObject<{ gender: ZodOptional<ZodEnum<{ f: ...; female: ...; m: ...; male: ...; }>>; isByok: ZodOptional<ZodBoolean>; lang: ZodOptional<ZodString>; name: ZodOptional<ZodString>; provider: ZodOptional<ZodString>; }, $strip>]>>>; volume: ZodOptional<ZodNumber>;}, $strip>;Defined in: src/schemas/website.ts:211
Web player feature — an article-scoped player with paragraph highlighting, click-to-jump navigation, and a floating mini-player that appears when the main player scrolls out of view.
Per-player playback overrides (voice, rate, pitch, volume) mirror
the arguments of core.speak(text, voice, params). Each is optional and
leaf-merges over the website default voice profile from
WebsiteVoiceSchema.
WebPlayerLayoutSchema
Section titled “WebPlayerLayoutSchema”const WebPlayerLayoutSchema: ZodObject<{ display: ZodDefault<ZodEnum<{ block: "block"; inline: "inline"; }>>; mode: ZodDefault<ZodEnum<{ fill: "fill"; shrink: "shrink"; }>>;}, $strip>;Defined in: src/schemas/website.ts:178
Player layout — width and how the main pill sits on the page. Defaults
to shrink + block (player sized to its content, on its own line),
which is the safe choice for arbitrary host pages. Use fill + inline
to reproduce a full-width player that flows with surrounding text.
WebPlayerNavigationSchema
Section titled “WebPlayerNavigationSchema”const WebPlayerNavigationSchema: ZodObject<{ paragraphClick: ZodDefault<ZodBoolean>; paragraphHighlight: ZodDefault<ZodBoolean>;}, $strip>;Defined in: src/schemas/website.ts:105
Toggles for article-level interactions. paragraphHighlight is the
visual "currently playing" indicator on each paragraph;
paragraphClick is click-to-jump navigation. They are independent —
highlight-only without click is "follow along, no skipping ahead";
click-only without highlight is unusual but valid.
WebPlayerSanitizeSchema
Section titled “WebPlayerSanitizeSchema”const WebPlayerSanitizeSchema: ZodObject<{ enabled: ZodDefault<ZodBoolean>; exclude: ZodDefault<ZodArray<ZodString>>;}, $strip>;Defined in: src/schemas/website.ts:192
Narration text sanitization. When enabled, non-rendered nodes
(script/style), interactive controls, embedded media, and hidden
content are excluded from narrated text; false narrates raw text.
WebPlayerThemeSchema
Section titled “WebPlayerThemeSchema”const WebPlayerThemeSchema: ZodUnion<readonly [ZodEnum<{ neutral: "neutral"; responsivevoice: "responsivevoice";}>, ZodObject<{ accent: ZodOptional<ZodString>; accentSoft: ZodOptional<ZodString>; bg: ZodOptional<ZodString>; border: ZodOptional<ZodString>; fg: ZodOptional<ZodString>; fill: ZodOptional<ZodString>; hover: ZodOptional<ZodString>; muted: ZodOptional<ZodString>; track: ZodOptional<ZodString>;}, $strip>]>;Defined in: src/schemas/website.ts:70
Theme input — either a preset name or a partial token record merged
over the neutral baseline.
WebPlayerThemeTokensSchema
Section titled “WebPlayerThemeTokensSchema”const WebPlayerThemeTokensSchema: ZodObject<{ accent: ZodOptional<ZodString>; accentSoft: ZodOptional<ZodString>; bg: ZodOptional<ZodString>; border: ZodOptional<ZodString>; fg: ZodOptional<ZodString>; fill: ZodOptional<ZodString>; hover: ZodOptional<ZodString>; muted: ZodOptional<ZodString>; track: ZodOptional<ZodString>;}, $strip>;Defined in: src/schemas/website.ts:43
Colour tokens that drive the web player's appearance. Each value is a CSS colour string. Applied as CSS custom properties on the player and the article container so paragraph styles inherit them.
WebsiteAnalyticsSchema
Section titled “WebsiteAnalyticsSchema”const WebsiteAnalyticsSchema: ZodObject<{ enabled: ZodDefault<ZodBoolean>;}, $strip>;Defined in: src/schemas/website.ts:342
Analytics configuration.
WebsiteConfigResponseSchema
Section titled “WebsiteConfigResponseSchema”const WebsiteConfigResponseSchema: ZodObject<{ analytics: ZodDefault<ZodObject<{ enabled: ZodDefault<ZodBoolean>; }, $strip>>; auth: ZodOptional<ZodObject<{ exp: ZodNumber; token: ZodString; }, $strip>>; features: ZodDefault<ZodObject<{ accessibilityNavigation: ZodDefault<ZodObject<{ enabled: ZodDefault<ZodBoolean>; }, $strip>>; exitIntent: ZodDefault<ZodObject<{ enabled: ZodDefault<ZodBoolean>; text: ZodDefault<ZodNullable<ZodString>>; }, $strip>>; paragraphNavigation: ZodDefault<ZodObject<{ enabled: ZodDefault<ZodBoolean>; }, $strip>>; speakEndPage: ZodDefault<ZodObject<{ enabled: ZodDefault<ZodBoolean>; text: ZodDefault<ZodNullable<ZodString>>; }, $strip>>; speakInactivity: ZodDefault<ZodObject<{ enabled: ZodDefault<ZodBoolean>; text: ZodDefault<ZodNullable<ZodString>>; }, $strip>>; speakLinks: ZodDefault<ZodObject<{ enabled: ZodDefault<ZodBoolean>; }, $strip>>; speakSelectedText: ZodDefault<ZodObject<{ enabled: ZodDefault<ZodBoolean>; }, $strip>>; webPlayer: ZodDefault<ZodObject<{ controls: ZodDefault<ZodObject<{ brand: ...; progress: ...; skip: ...; speed: ...; time: ...; }, $strip>>; enabled: ZodDefault<ZodBoolean>; layout: ZodDefault<ZodObject<{ display: ...; mode: ...; }, $strip>>; miniPlayer: ZodDefault<ZodPreprocess<ZodObject<..., ...>>>; navigation: ZodDefault<ZodObject<{ paragraphClick: ...; paragraphHighlight: ...; }, $strip>>; paragraphSelector: ZodDefault<ZodString>; pitch: ZodOptional<ZodNumber>; position: ZodDefault<ZodUnion<readonly [..., ...]>>; rate: ZodOptional<ZodNumber>; sanitize: ZodDefault<ZodObject<{ enabled: ...; exclude: ...; }, $strip>>; selector: ZodDefault<ZodString>; theme: ZodDefault<ZodUnion<readonly [..., ...]>>; voice: ZodOptional<ZodPreprocess<ZodUnion<...>>>; volume: ZodOptional<ZodNumber>; }, $strip>>; welcomeMessage: ZodDefault<ZodObject<{ enabled: ZodDefault<ZodBoolean>; text: ZodDefault<ZodNullable<ZodString>>; }, $strip>>; welcomeMessageOnce: ZodDefault<ZodBoolean>; }, $strip>>; voice: ZodDefault<ZodObject<{ name: ZodDefault<ZodString>; pitch: ZodDefault<ZodNumber>; rate: ZodDefault<ZodNumber>; volume: ZodDefault<ZodNumber>; }, $strip>>;}, $strip>;Defined in: src/schemas/website.ts:366
Full website config response from GET /v2/config.
WebsiteFeaturesSchema
Section titled “WebsiteFeaturesSchema”const WebsiteFeaturesSchema: ZodObject<{ accessibilityNavigation: ZodDefault<ZodObject<{ enabled: ZodDefault<ZodBoolean>; }, $strip>>; exitIntent: ZodDefault<ZodObject<{ enabled: ZodDefault<ZodBoolean>; text: ZodDefault<ZodNullable<ZodString>>; }, $strip>>; paragraphNavigation: ZodDefault<ZodObject<{ enabled: ZodDefault<ZodBoolean>; }, $strip>>; speakEndPage: ZodDefault<ZodObject<{ enabled: ZodDefault<ZodBoolean>; text: ZodDefault<ZodNullable<ZodString>>; }, $strip>>; speakInactivity: ZodDefault<ZodObject<{ enabled: ZodDefault<ZodBoolean>; text: ZodDefault<ZodNullable<ZodString>>; }, $strip>>; speakLinks: ZodDefault<ZodObject<{ enabled: ZodDefault<ZodBoolean>; }, $strip>>; speakSelectedText: ZodDefault<ZodObject<{ enabled: ZodDefault<ZodBoolean>; }, $strip>>; webPlayer: ZodDefault<ZodObject<{ controls: ZodDefault<ZodObject<{ brand: ZodDefault<ZodBoolean>; progress: ZodDefault<ZodBoolean>; skip: ZodDefault<ZodBoolean>; speed: ZodDefault<ZodBoolean>; time: ZodDefault<ZodBoolean>; }, $strip>>; enabled: ZodDefault<ZodBoolean>; layout: ZodDefault<ZodObject<{ display: ZodDefault<ZodEnum<{ block: ...; inline: ...; }>>; mode: ZodDefault<ZodEnum<{ fill: ...; shrink: ...; }>>; }, $strip>>; miniPlayer: ZodDefault<ZodPreprocess<ZodObject<{ animation: ZodDefault<ZodEnum<...>>; enabled: ZodDefault<ZodBoolean>; position: ZodDefault<ZodUnion<...>>; }, $strip>>>; navigation: ZodDefault<ZodObject<{ paragraphClick: ZodDefault<ZodBoolean>; paragraphHighlight: ZodDefault<ZodBoolean>; }, $strip>>; paragraphSelector: ZodDefault<ZodString>; pitch: ZodOptional<ZodNumber>; position: ZodDefault<ZodUnion<readonly [ZodEnum<{ after: "after"; before: "before"; inline: "inline"; }>, ZodObject<{ at: ZodDefault<...>; target: ZodString; }, $strip>]>>; rate: ZodOptional<ZodNumber>; sanitize: ZodDefault<ZodObject<{ enabled: ZodDefault<ZodBoolean>; exclude: ZodDefault<ZodArray<ZodString>>; }, $strip>>; selector: ZodDefault<ZodString>; theme: ZodDefault<ZodUnion<readonly [ZodEnum<{ neutral: "neutral"; responsivevoice: "responsivevoice"; }>, ZodObject<{ accent: ZodOptional<...>; accentSoft: ZodOptional<...>; bg: ZodOptional<...>; border: ZodOptional<...>; fg: ZodOptional<...>; fill: ZodOptional<...>; hover: ZodOptional<...>; muted: ZodOptional<...>; track: ZodOptional<...>; }, $strip>]>>; voice: ZodOptional<ZodPreprocess<ZodUnion<readonly [ZodString, ZodObject<{ flags: ...; regex: ...; }, $strip>, ZodObject<{ gender: ...; isByok: ...; lang: ...; name: ...; provider: ...; }, $strip>]>>>; volume: ZodOptional<ZodNumber>; }, $strip>>; welcomeMessage: ZodDefault<ZodObject<{ enabled: ZodDefault<ZodBoolean>; text: ZodDefault<ZodNullable<ZodString>>; }, $strip>>; welcomeMessageOnce: ZodDefault<ZodBoolean>;}, $strip>;Defined in: src/schemas/website.ts:306
Aggregated per-website feature flags returned by GET /v2/config.
WebsiteVoiceSchema
Section titled “WebsiteVoiceSchema”const WebsiteVoiceSchema: ZodObject<{ name: ZodDefault<ZodString>; pitch: ZodDefault<ZodNumber>; rate: ZodDefault<ZodNumber>; volume: ZodDefault<ZodNumber>;}, $strip>;Defined in: src/schemas/website.ts:330
Voice profile from the dashboard — curated subset of voice_profiles table.
WelcomeMessageFeatureSchema
Section titled “WelcomeMessageFeatureSchema”const WelcomeMessageFeatureSchema: ZodObject<{ enabled: ZodDefault<ZodBoolean>; text: ZodDefault<ZodNullable<ZodString>>;}, $strip>;Defined in: src/schemas/website.ts:16
Per-feature configuration. Each feature has enabled and optional text/settings.
Functions
Section titled “Functions”formatProsodyApplied()
Section titled “formatProsodyApplied()”function formatProsodyApplied(knobs): string;Defined in: src/schemas/prosody.ts:53
Format a set/iterable of knobs into the comma-separated header value. Output order follows PROSODY_KNOBS so two calls with the same inputs produce byte-identical headers (cache-key friendly).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
knobs | Iterable<"pitch" | "rate" | "volume"> |
Returns
Section titled “Returns”string
getDefaultFormat()
Section titled “getDefaultFormat()”function getDefaultFormat(engine): "mp3" | "ogg" | "wav";Defined in: src/schemas/core.ts:119
Get the default audio format for a TTS engine.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
engine | "g1" | "g2" | "g3" | "g5" | "gwn" | "msv" | "oai" |
Returns
Section titled “Returns”"mp3" | "ogg" | "wav"
isAudioFormat()
Section titled “isAudioFormat()”function isAudioFormat(value): value is "mp3" | "ogg" | "wav";Defined in: src/guards.ts:65
Check if a value is a valid audio format
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
value | unknown |
Returns
Section titled “Returns”value is "mp3" | "ogg" | "wav"
isBrowserVoiceInfo()
Section titled “isBrowserVoiceInfo()”function isBrowserVoiceInfo(value): value is { default?: boolean; lang: string; localService: boolean; name: string; voiceURI: string };Defined in: src/guards.ts:157
Check if a value is a valid BrowserVoiceInfo object
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value | unknown | The value to check |
Returns
Section titled “Returns”value is { default?: boolean; lang: string; localService: boolean; name: string; voiceURI: string }
True if the value is a valid BrowserVoiceInfo object
isFormatSupportedByEngine()
Section titled “isFormatSupportedByEngine()”function isFormatSupportedByEngine(engine, format): boolean;Defined in: src/schemas/core.ts:111
Check whether a given audio format is supported by a TTS engine.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
engine | "g1" | "g2" | "g3" | "g5" | "gwn" | "msv" | "oai" |
format | "mp3" | "ogg" | "wav" |
Returns
Section titled “Returns”boolean
isPlatformReport()
Section titled “isPlatformReport()”function isPlatformReport(value): value is { browser: string; browserVersion: string; deviceType?: "desktop" | "mobile" | "tablet"; os: string; osVersion: string };Defined in: src/guards.ts:166
Check if a value is a valid PlatformReport object
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value | unknown | The value to check |
Returns
Section titled “Returns”value is { browser: string; browserVersion: string; deviceType?: "desktop" | "mobile" | "tablet"; os: string; osVersion: string }
True if the value is a valid PlatformReport object
isRVErrorEvent()
Section titled “isRVErrorEvent()”function isRVErrorEvent(value): value is { code?: string; message: string; timestamp: number; type: "OnError" };Defined in: src/guards.ts:135
Check if a value is a valid RVErrorEvent object
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value | unknown | The value to check |
Returns
Section titled “Returns”value is { code?: string; message: string; timestamp: number; type: "OnError" }
True if the value is a valid RVErrorEvent object
isRVEvent()
Section titled “isRVEvent()”function isRVEvent(value): value is { timestamp: number; type: "OnLoad" | "OnReady" | "OnStart" | "OnEnd" | "OnError" | "OnPause" | "OnResume" | "OnServiceSwitched" | "OnClickEvent" | "OnAllowSpeechClicked" | "OnPartStart" | "OnPartEnd" | "OnVoiceResolved" };Defined in: src/guards.ts:126
Check if a value is a valid RVEvent object
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value | unknown | The value to check |
Returns
Section titled “Returns”value is { timestamp: number; type: "OnLoad" | "OnReady" | "OnStart" | "OnEnd" | "OnError" | "OnPause" | "OnResume" | "OnServiceSwitched" | "OnClickEvent" | "OnAllowSpeechClicked" | "OnPartStart" | "OnPartEnd" | "OnVoiceResolved" }
True if the value is a valid RVEvent object
isRVEventType()
Section titled “isRVEventType()”function isRVEventType(value): value is "OnLoad" | "OnReady" | "OnStart" | "OnEnd" | "OnError" | "OnPause" | "OnResume" | "OnServiceSwitched" | "OnClickEvent" | "OnAllowSpeechClicked" | "OnPartStart" | "OnPartEnd" | "OnVoiceResolved";Defined in: src/guards.ts:86
Check if a value is a valid event type
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
value | unknown |
Returns
Section titled “Returns”value is "OnLoad" | "OnReady" | "OnStart" | "OnEnd" | "OnError" | "OnPause" | "OnResume" | "OnServiceSwitched" | "OnClickEvent" | "OnAllowSpeechClicked" | "OnPartStart" | "OnPartEnd" | "OnVoiceResolved"
isRVServiceSwitchedEvent()
Section titled “isRVServiceSwitchedEvent()”function isRVServiceSwitchedEvent(value): value is { from: "g1" | "g2" | "g3" | "g5" | "gwn" | "msv" | "oai" | "native"; timestamp: number; to: "g1" | "g2" | "g3" | "g5" | "gwn" | "msv" | "oai" | "native"; type: "OnServiceSwitched" };Defined in: src/guards.ts:144
Check if a value is a valid RVServiceSwitchedEvent object
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value | unknown | The value to check |
Returns
Section titled “Returns”value is { from: "g1" | "g2" | "g3" | "g5" | "gwn" | "msv" | "oai" | "native"; timestamp: number; to: "g1" | "g2" | "g3" | "g5" | "gwn" | "msv" | "oai" | "native"; type: "OnServiceSwitched" }
True if the value is a valid RVServiceSwitchedEvent object
isSynthesizeRequest()
Section titled “isSynthesizeRequest()”function isSynthesizeRequest(value): value is { engine?: "g1" | "g2" | "g3" | "g5" | "gwn" | "msv" | "oai"; format?: "mp3" | "ogg" | "wav"; gender?: "male" | "female"; lang?: string; name?: string; pitch?: number; rate?: number; text: string; voice?: string; volume?: number };Defined in: src/guards.ts:117
Check if a value is a valid SynthesizeRequest object
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value | unknown | The value to check |
Returns
Section titled “Returns”value is { engine?: "g1" | "g2" | "g3" | "g5" | "gwn" | "msv" | "oai"; format?: "mp3" | "ogg" | "wav"; gender?: "male" | "female"; lang?: string; name?: string; pitch?: number; rate?: number; text: string; voice?: string; volume?: number }
True if the value is a valid SynthesizeRequest object
isSystemVoice()
Section titled “isSystemVoice()”function isSystemVoice(value): value is { deprecated?: boolean; fallbackVoice?: boolean; gender?: string; id: number; lang?: string; name: string; pitch?: number; rate?: number; service?: "g1" | "g2" | "g3" | "g5" | "gwn" | "msv" | "oai"; timerSpeed?: number; voiceName?: string; volume?: number };Defined in: src/guards.ts:108
Check if a value is a valid SystemVoice object
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value | unknown | The value to check |
Returns
Section titled “Returns”value is { deprecated?: boolean; fallbackVoice?: boolean; gender?: string; id: number; lang?: string; name: string; pitch?: number; rate?: number; service?: "g1" | "g2" | "g3" | "g5" | "gwn" | "msv" | "oai"; timerSpeed?: number; voiceName?: string; volume?: number }
True if the value is a valid SystemVoice object
isTTSService()
Section titled “isTTSService()”function isTTSService(value): value is "g1" | "g2" | "g3" | "g5" | "gwn" | "msv" | "oai";Defined in: src/guards.ts:58
Check if a value is a valid TTS service
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
value | unknown |
Returns
Section titled “Returns”value is "g1" | "g2" | "g3" | "g5" | "gwn" | "msv" | "oai"
isVoice()
Section titled “isVoice()”function isVoice(value): value is { deprecated?: boolean; flag: string; gender: "f" | "m"; isByok?: boolean; lang: string; name: string; provider?: string; voiceIDs: number[] };Defined in: src/guards.ts:99
Check if a value is a valid Voice object
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value | unknown | The value to check |
Returns
Section titled “Returns”value is { deprecated?: boolean; flag: string; gender: "f" | "m"; isByok?: boolean; lang: string; name: string; provider?: string; voiceIDs: number[] }
True if the value is a valid Voice object
isVoiceGender()
Section titled “isVoiceGender()”function isVoiceGender(value): value is "male" | "female";Defined in: src/guards.ts:72
Check if a value is a valid voice gender
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
value | unknown |
Returns
Section titled “Returns”value is "male" | "female"
isVoiceGenderShort()
Section titled “isVoiceGenderShort()”function isVoiceGenderShort(value): value is "f" | "m";Defined in: src/guards.ts:79
Check if a value is a valid short gender
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
value | unknown |
Returns
Section titled “Returns”value is "f" | "m"
isVoiceReportRequest()
Section titled “isVoiceReportRequest()”function isVoiceReportRequest(value): value is { platform: { browser: string; browserVersion: string; deviceType?: "desktop" | "mobile" | "tablet"; os: string; osVersion: string }; sdkVersion?: string; timestamp: string; voices: { default?: boolean; lang: string; localService: boolean; name: string; voiceURI: string }[] };Defined in: src/guards.ts:175
Check if a value is a valid VoiceReportRequest object
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value | unknown | The value to check |
Returns
Section titled “Returns”value is { platform: { browser: string; browserVersion: string; deviceType?: "desktop" | "mobile" | "tablet"; os: string; osVersion: string }; sdkVersion?: string; timestamp: string; voices: { default?: boolean; lang: string; localService: boolean; name: string; voiceURI: string }[] }
True if the value is a valid VoiceReportRequest object
isVoiceReportResponse()
Section titled “isVoiceReportResponse()”function isVoiceReportResponse(value): value is { count: number; systemVoices: { deprecated?: boolean; fallbackVoice?: boolean; gender?: string; id: number; lang?: string; name: string; pitch?: number; rate?: number; service?: "g1" | "g2" | "g3" | "g5" | "gwn" | "msv" | "oai"; timerSpeed?: number; voiceName?: string; volume?: number }[]; voices: { deprecated?: boolean; flag: string; gender: "f" | "m"; isByok?: boolean; lang: string; name: string; provider?: string; voiceIDs: number[] }[] };Defined in: src/guards.ts:184
Check if a value is a valid VoiceReportResponse object
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value | unknown | The value to check |
Returns
Section titled “Returns”value is { count: number; systemVoices: { deprecated?: boolean; fallbackVoice?: boolean; gender?: string; id: number; lang?: string; name: string; pitch?: number; rate?: number; service?: "g1" | "g2" | "g3" | "g5" | "gwn" | "msv" | "oai"; timerSpeed?: number; voiceName?: string; volume?: number }[]; voices: { deprecated?: boolean; flag: string; gender: "f" | "m"; isByok?: boolean; lang: string; name: string; provider?: string; voiceIDs: number[] }[] }
True if the value is a valid VoiceReportResponse object
parseProsodyApplied()
Section titled “parseProsodyApplied()”function parseProsodyApplied(value): Set<"pitch" | "rate" | "volume">;Defined in: src/schemas/prosody.ts:36
Parse the RV-Prosody-Applied header value into a set of knobs. Tolerates
null/undefined (legacy server, no header) and empty string (server applied
nothing) by returning an empty set. Unknown tokens are dropped silently —
defensive against future server additions an old client doesn't know.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
value | string | null | undefined |
Returns
Section titled “Returns”Set<"pitch" | "rate" | "volume">