LogoRobo.js
Packages@robojs/ai

VoiceSessionStartOptions

Interface: VoiceSessionStartOptions

Configuration structure used when starting a managed voice session.

Example

await engine.startVoiceSession({
  guildId: '123',
  sessionId: 'voice-1',
  channel: voiceChannel,
  frameSource: microphoneStream,
  configuration: {
    endpointing: 'server-vad',
    targetSampleRate: 16000
  }
})

Properties

PropertyTypeDescription
channelnull | VoiceBasedChannelVoice channel to join for playback.
configuration{ endpointing: VoiceEndpointingStrategy; maxSilenceMs: number; model: string; playbackVoice: null | string; realtimeApiKey: null | string; targetSampleRate: number; }Engine-specific configuration describing voice runtime behavior.
configuration.endpointingVoiceEndpointingStrategyEndpointing strategy to use for speech detection.
configuration.maxSilenceMs?numberMaximum silence tolerated before auto-stopping (ms).
configuration.model?stringOptional override for the realtime model identifier.
configuration.playbackVoice?null | stringVoice name used for playback responses.
configuration.realtimeApiKey?null | stringAPI key for realtime services when required.
configuration.targetSampleRatenumberSample rate expected by the engine.
conversation?ConversationInputConversation metadata shared with chat flows.
conversationKey?stringCache key used to resume prior voice sessions.
frameSourceAsyncIterable<VoiceInputFrame, any, any>Streaming source of microphone frames.
guildIdstringDiscord guild identifier hosting the session.
member?null | GuildMemberGuild member initiating the session, if any.
onAudioDelta?(delta: VoicePlaybackDelta) => void | Promise<void>Callback invoked with generated playback audio chunks.
onTranscription?(segment: VoiceTranscriptSegment) => void | Promise<void>Callback invoked whenever a new transcript segment is available.
onWarning?(warning: Error) => void | Promise<void>Callback invoked when the engine emits a warning.
sessionIdstringUnique session identifier generated by the caller.
textChannel?null | TextBasedChannelText channel used for transcription updates.
transcriptTarget?null | TextBasedChannelTarget text channel for transcripts or summaries.
userId?null | stringDiscord user identifier associated with the session.

On this page