# Agent.getVoice()
[EN] Source: https://mastra.ai/reference/agents/getVoice

The `.getVoice()` method retrieves the voice provider configured for an agent, resolving it if it's a function. This method is used to access the agent's speech capabilities for text-to-speech and speech-to-text functionality.

## Usage example

```typescript copy
await agent.getVoice();
```

## Parameters

<PropertiesTable
  content={[
    {
      name: "options",
      type: "{ runtimeContext?: RuntimeContext }",
      isOptional: true,
      defaultValue: "{}",
      description: "Optional configuration object containing runtime context.",
    },
  ]}
/>

## Returns

<PropertiesTable
  content={[
    {
      name: "voice",
      type: "Promise<MastraVoice>",
      description:
        "A promise that resolves to the voice provider configured for the agent, or a default voice provider if none was configured.",
    },
  ]}
/>

## Extended usage example

```typescript copy
await agent.getVoice({
  runtimeContext: new RuntimeContext(),
});
```

### Options parameters

<PropertiesTable
  content={[
    {
      name: "runtimeContext",
      type: "RuntimeContext",
      isOptional: true,
      defaultValue: "new RuntimeContext()",
      description:
        "Runtime context for dependency injection and contextual information.",
    },
  ]}
/>

## Related

- [Adding voice to agents](/docs/agents/adding-voice)
- [Voice providers](../voice/mastra-voice)


---
title: "Reference: Agent.getWorkflows() | Agents"
description: "Documentation for the `Agent.getWorkflows()` method in Mastra agents, which retrieves the workflows that the agent can execute."
---