> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/labs-voice-agent/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/labs-voice-agent/_mcp/server.

# nemo_voice_agent.pipecat.services.common

## Module Contents

### Classes

| Name                                                                           | Description |
| ------------------------------------------------------------------------------ | ----------- |
| [`UserAudioBuffer`](#nemo_voice_agent-pipecat-services-common-UserAudioBuffer) | -           |

### Data

[`DEFAULT_TEXT_PROMPT_FOR_AUDIO`](#nemo_voice_agent-pipecat-services-common-DEFAULT_TEXT_PROMPT_FOR_AUDIO)

[`DEFAULT_TEXT_PROMPT_FOR_TRANSCRIPT`](#nemo_voice_agent-pipecat-services-common-DEFAULT_TEXT_PROMPT_FOR_TRANSCRIPT)

### API

```python
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`**

Get the duration of the audio frames.

---

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

Finalize the transcript.

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

Replace the old audio turns with the `_previsous_user_text`.

```python
nemo_voice_agent.pipecat.services.common.UserAudioBuffer.process_frame(
    frame,
    direction
)
```

async

```python
nemo_voice_agent.pipecat.services.common.UserAudioBuffer.reset() -> None
```

Reset the audio buffer.

```python
nemo_voice_agent.pipecat.services.common.DEFAULT_TEXT_PROMPT_FOR_AUDIO = 'Follow instructions or answer questions in the audio.'
```

```python
nemo_voice_agent.pipecat.services.common.DEFAULT_TEXT_PROMPT_FOR_TRANSCRIPT = 'Here is the pseudo-transcript of the audio for reference:'
```