> For the complete documentation index, see [llms.txt](https://docs.openmind.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openmind.com/developer-cookbook/examples/conversation.md).

# Conversation

This section provides various examples for integrating and using multiple cloud-based AI endpoints, such as OpenAI, DeepSeek, and others, for voice input processing, text-to-speech (TTS) and emotion detection. Whether you need to convert spoken language into text (ASR) or generate natural-sounding speech from text, these examples will help you interact with different cloud providers seamlessly.

### Voice to Text Processing with OpenAI

This example uses your `default` audio in (microphone) and your `default` audio output (speaker). Please test both your microphone and speaker in your system settings to make sure they are connected and working. On a Mac, the system may request permission to access your audio - Allow permissions.

```bash
make run CONFIG=conversation
```

Especially on Linux, such as on Ubuntu 20.04 on the Nvidia Orin, audio support can be marginal. Expect some audio inputs and outputs to not work correctly, or to advertise incorrect hardware capabilities, such as USB microphones that report zero input channels etc.

### Selecting and testing your audio devices

OM1 uses your operating system's default microphone and speaker (via `portaudio`). Set the correct defaults in your OS sound settings (macOS: **System Settings → Sound**; Linux: `pavucontrol` or `alsamixer`) and test them there before running the agent.

### Debugging audio

Run in dev mode to get verbose logs, including the ASR input and TTS playback state, which help diagnose audio issues:

```bash
make dev CONFIG=conversation
```

The ASR input's capture settings are controlled by its `config` block in the agent config — for example `GoogleASRInput` accepts `rate` (e.g. `16000`) and `chunk` (e.g. `1600`). Tune these if the microphone reports unexpected capabilities.

### Give it a personality

This agent's behavior comes mostly from its prompt. Change `system_prompt_base` and you have a different character on the same pipeline — see [Smart Toy & Companion](/developer-cookbook/examples/smart_toy.md) for two ready-to-copy examples.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.openmind.com/developer-cookbook/examples/conversation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
