nemo_voice_agent.pipecat.services.common

View as Markdown

Module Contents

Classes

NameDescription
UserAudioBuffer-

Data

DEFAULT_TEXT_PROMPT_FOR_AUDIO

DEFAULT_TEXT_PROMPT_FOR_TRANSCRIPT

API

class nemo_voice_agent.pipecat.services.common.UserAudioBuffer(
context: pipecat.processors.aggregators.llm_context.LLMContext,
user_context_aggregator: pipecat.processors.aggregators.llm_response_universal.LLMUserAggregator,
pre_cache_duration_secs: float = 0.2,
use_transcript: bool = False,
text_prompt_for_audio: typing.Optional[str] = None,
text_prompt_for_transcript: typing.Optional[str] = None,
raw_audio_frame_len_in_secs: float = 0.016,
keep_only_last_audio_turn: bool = False
)

Bases: FrameProcessor

_audio_frames
= []
_previsous_user_text
= ''
_text_prompt_for_audio
_text_prompt_for_transcript
_transcript_buffer
= []
buffer_duration
float

Get the duration of the audio frames.

nemo_voice_agent.pipecat.services.common.UserAudioBuffer._finalize_transcript() -> str

Finalize the transcript.

nemo_voice_agent.pipecat.services.common.UserAudioBuffer._replace_previous_audio_turns() -> None

Replace the old audio turns with the _previsous_user_text.

nemo_voice_agent.pipecat.services.common.UserAudioBuffer.process_frame(
frame,
direction
)
async
nemo_voice_agent.pipecat.services.common.UserAudioBuffer.reset() -> None

Reset the audio buffer.

nemo_voice_agent.pipecat.services.common.DEFAULT_TEXT_PROMPT_FOR_AUDIO = 'Follow instructions or answer questions in the audio.'
nemo_voice_agent.pipecat.services.common.DEFAULT_TEXT_PROMPT_FOR_TRANSCRIPT = 'Here is the pseudo-transcript of the audio for reference:'