How to use the api for live call translation

Asked on 06/11/2025

1 search

To use the API for live call translation, you can leverage the new Translation API introduced by Apple. This API allows developers to enable Live Translation for calls within their communication apps. Here's a brief overview of how you can use it:

  1. Translation Session: Use the translation session class to manage translations. This class allows you to translate one or more strings at a time and get results back using Swift async syntax. You don't create an instance of translation session directly; instead, you attach a translation task to your view, which provides a session instance.

  2. Batch Translation: For translating multiple strings, use batch translation functions. This is more efficient than translating single strings one at a time. You can choose between getting all results at once or streaming them as they become available.

  3. Language Detection: If you're unsure about the source language, you can set the source language to nil, and the API will attempt to identify it automatically. This is useful for live call scenarios where the language might not be known in advance.

  4. Language Support: The API supports a wide range of languages, similar to those in the Translate app. You can check which languages are supported using the language availability class.

  5. On-Device Processing: The translation is powered by on-device machine learning models, ensuring that personal conversations remain private.

For more detailed implementation guidance, you can refer to the session Meet the Translation API (04:01) which covers flexible translation options and best practices.