voice

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package voice provides integration between OmniMeet and OmniVoice.

VoiceAgentParticipant wraps an AgentParticipant with OmniVoice STT/TTS capabilities, enabling AI agents to hear and speak in meetings.

This package uses omnivoice-core types directly, allowing seamless switching between providers (Deepgram, OpenAI, ElevenLabs, Google, etc.).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromTTSResult

func FromTTSResult(result *tts.SynthesisResult, targetSampleRate int) provider.AudioFrame

FromTTSResult converts an OmniVoice TTS result to a meeting AudioFrame.

func ToSTTFormat

func ToSTTFormat(frame provider.AudioFrame, targetSampleRate int) ([]byte, stt.TranscriptionConfig)

ToSTTFormat converts a meeting AudioFrame to OmniVoice STT format.

Types

type Config

type Config struct {
	// STTProvider is the speech-to-text provider (from omnivoice).
	STTProvider stt.Provider

	// TTSProvider is the text-to-speech provider (from omnivoice).
	TTSProvider tts.Provider

	// STTConfig configures speech-to-text.
	STTConfig stt.TranscriptionConfig

	// TTSConfig configures text-to-speech.
	TTSConfig tts.SynthesisConfig

	// OnTranscript is called when speech is transcribed.
	OnTranscript TranscriptHandler
}

Config configures the VoiceAgentParticipant.

type TranscriptHandler

type TranscriptHandler func(participantID, participantName, text string, isFinal bool)

TranscriptHandler is called when speech is transcribed.

type VoiceAgentParticipant

type VoiceAgentParticipant struct {
	// contains filtered or unexported fields
}

VoiceAgentParticipant wraps AgentParticipant with OmniVoice integration.

func NewVoiceAgentParticipant

func NewVoiceAgentParticipant(participant provider.AgentParticipant, cfg Config) *VoiceAgentParticipant

NewVoiceAgentParticipant creates a new VoiceAgentParticipant.

func (*VoiceAgentParticipant) OnTranscript

func (v *VoiceAgentParticipant) OnTranscript(handler TranscriptHandler)

OnTranscript sets the transcript handler.

func (*VoiceAgentParticipant) Participant

Participant returns the underlying AgentParticipant.

func (*VoiceAgentParticipant) Speak

func (v *VoiceAgentParticipant) Speak(ctx context.Context, text string) error

Speak synthesizes text and publishes audio to the meeting.

func (*VoiceAgentParticipant) SpeakStream

func (v *VoiceAgentParticipant) SpeakStream(ctx context.Context, text string) error

SpeakStream synthesizes text with streaming and publishes audio chunks.

func (*VoiceAgentParticipant) StartTranscribing

func (v *VoiceAgentParticipant) StartTranscribing(ctx context.Context, participantID string) error

StartTranscribing begins real-time transcription of a participant's audio.

func (*VoiceAgentParticipant) StartTranscribingAll

func (v *VoiceAgentParticipant) StartTranscribingAll(ctx context.Context) error

StartTranscribingAll begins transcription of all current participants.

func (*VoiceAgentParticipant) StopTranscribing

func (v *VoiceAgentParticipant) StopTranscribing(participantID string)

StopTranscribing stops transcription of a participant's audio.

func (*VoiceAgentParticipant) StopTranscribingAll

func (v *VoiceAgentParticipant) StopTranscribingAll()

StopTranscribingAll stops all active transcriptions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL