> For the complete documentation index, see [llms.txt](https://docs.voipnumber.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.voipnumber.net/how-to/translate-speech-in-a-real-time.md).

# Translate speech in a real time

## Overview

You can translate speech in a real time between call participants

This can be set per [Connection](/components/connection.md) or on the [Trunk](/components/trunk.md) , by making a [Call Flow](/components/call-flow.md) with action `Translate speech coming from VoIP Number` / `Translate speech coming to VoIP Number`&#x20;

Works with sampling rates: 8 000, 16 000, 24 000, 32 000, 48 000 Hz

[Languages supported by real time speech translation 🗣️](/knowledge/languages-supported-by-real-time-speech-translation.md)

<figure><img src="/files/frNhbhNmagayGLXRzIFr" alt=""><figcaption></figcaption></figure>

{% embed url="<https://youtu.be/35NOLqP_4Ns>" %}

## Setup

You need to create a [Call Flow](/components/call-flow.md) that translates speech in one or both directions. Then, you enable that [Call Flow](/components/call-flow.md) on [Trunk](/components/trunk.md) or [Connection](/components/connection.md). Let's see how to do this in both cases

### Translate speech to/from SIP Connection

1. Go to [Call Flow Builder](/features/call-flow-builder.md) on your [app.voipnumber.net/callflowbuilder](https://app.voipnumber.net/callflowbuilder) or to Call Flows page at [app.voipnumber.net/callflows](https://app.voipnumber.net/callflows) and select `+Add` (or `+New`). Name your [Call Flow](/components/call-flow.md) and select if it's `A leg` or `B leg`&#x20;

<figure><img src="/files/iGReFQCBUupf8iWBm41s" alt=""><figcaption></figcaption></figure>

2. Place `Translate speech coming from VoIP Number` / `Translate speech coming to VoIP Number` actions on the [Call Flow](/components/call-flow.md). This tells VoIP Number to start translating

<figure><img src="/files/njBYHtaj4Q1MUHuTKGIC" alt=""><figcaption></figcaption></figure>

3. Configure translation. Select languages

<figure><img src="/files/pez1TBWBhQ93YwtGu7hA" alt=""><figcaption></figcaption></figure>

4. Select TTS and voice (we recommend to always use asynchronous TTS (*gcp async streaming*) which has slightly reduced support for languages but makes latency to first audio byte independent from the  speech length)

<figure><img src="/files/FxVH5A40nTTPrjrePcNr" alt=""><figcaption></figcaption></figure>

5. Adjust audio levels

💡 If you need translated speech to be louder than original speech, attenuate original speech (rather than amplifying output - *gcp async* produces quite loud speech so amplifying it may cause distortion)

<figure><img src="/files/dZduh93kpeqKagjALB35" alt=""><figcaption></figcaption></figure>

6. Select your [Call Flow](/components/call-flow.md) on `Inbound` settings of your [Connection](/components/connection.md)

<figure><img src="/files/BPcNge92JUbXogMO0KMH" alt=""><figcaption></figcaption></figure>

✅ You now have created a [Call Flow](/components/call-flow.md) that starts speech translation in both directions on an inbound call to [Connection](/components/connection.md) To set translation on outbound calls from [Connection](/components/connection.md) you would create `A leg` [Call Flow](/components/call-flow.md) instead

In a typical scenario you only want speech to be translated once in a single direction, so you setup translation in a single direction instead, and on both `Inbound` and `Outbound` settings for the translation to start when you are making and when receiving a call. Do this consistently across  speech translation enabled Connections to avoid translating speech twice in the same direction

Alternatively configure a [Trunk](/components/trunk.md). With a Trunk a [Call Flow](/components/call-flow.md) is independent of who is calling

### Translate speech on a Trunk

As before, we will setup speech translation in both directions. We will use a [Trunk](/components/trunk.md) to create a channel that accepts a call from any SIP and sends that to PSTN/mobile, so you can dial someone on mobile phone and have speech translated

Trunk has `TRUNK IN` and `TRUNK OUT` sections, so you can setup [Call Flow](/components/call-flow.md) on any of them or both. We will setup speech translation on outbound settings, in both directions&#x20;

1. Similar to previous steps 1-5, create a [Call Flow](/components/call-flow.md) with actions to translate speech, but select a `B leg` type

2. Enable external calls on your Trunk. Select from your numbers, this will be a number presented as a *Caller* on all calls through this Trunk

<figure><img src="/files/szUgZ9jNY6dVjZuRBcQx" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/ZU19IpEvvbAzrMyZCYTb" alt=""><figcaption></figcaption></figure>

3. Select your [Call Flow](/components/call-flow.md) in `TRNUK OUT`  settings of your Trunk

<figure><img src="/files/BPcNge92JUbXogMO0KMH" alt=""><figcaption></figcaption></figure>

✅ You now have created a [Trunk](/components/trunk.md) that translates speech on all calls to public telephony


---

# 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:

```
GET https://docs.voipnumber.net/how-to/translate-speech-in-a-real-time.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
