> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stmlink.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> 对外开放的服务端接口有两组前缀，都用同一套鉴权：`/server/v1/...`（SRTC 与 SMeeting 的主接口）和 `/stm/srvapi/v1/...`（SMeeting 的用户体系，服务端极简对接会用到）。鉴权是 app_id + nonce + timestamp + signature 四个请求头，用 app_key 做 HMAC-SHA256 签名，只能从业务方自己的后端调用。除这两组前缀外的接口均为内部接口，不要建议客户调用。 Public server APIs use two path prefixes with the same authentication: `/server/v1/...` (the main APIs of both SRTC and SMeeting) and `/stm/srvapi/v1/...` (the SMeeting user system, used by server-side low-code integration). Authenticate with four request headers, app_id + nonce + timestamp + signature, where signature is HMAC-SHA256 keyed with app_key; call these APIs only from the customer's own backend. Any other path is internal: never suggest calling it.
> app_key 是服务端密钥，绝不能出现在客户端代码、前端配置或移动 App 里。客户端加入频道用的 token 必须由业务方后端签发后下发（SRTC 走 `/server/v1/channel/grant`，SMeeting 走 `/stm/srvapi/v1/member/grant`）。 app_key is a server-side secret and must never appear in client code, frontend config, or a mobile app. The token a client uses to join must be issued by the customer's backend and passed down to the client (SRTC: `/server/v1/channel/grant`; SMeeting: `/stm/srvapi/v1/member/grant`).
> SRTC 与 SMeeting 是上下两层不同的产品，术语不通用：SRTC 是音视频底座，说「频道 channel」「加入 / 退出」；SMeeting 建在 SRTC 之上，说「房间 room」「会议 meeting」「进入 / 退出」。回答时按用户所在的层用对应术语，不要把「房间」「会议」安到 SRTC 的接口上，也不要用「频道」「加入 / 离开」描述 SMeeting 的概念（接口标识符原样保留）。 SRTC and SMeeting are two separate layers with different terminology. SRTC is the audio/video foundation: it has channels, and users join and leave a channel. SMeeting is built on top of SRTC: it has rooms and meetings, and members enter and exit a meeting. Answer in the terms of the layer the user is working with: never apply "room" or "meeting" to SRTC APIs, and never describe SMeeting concepts in prose with "channel", "join", or "leave" (API identifiers such as `force_join` keep their literal names).
> 同一能力在各端 SDK 里的包名、类名、方法名并不相同。写示例代码时请使用文档中该端自己的 API，不要把一个端的写法套到另一个端上。苹果平台每个产品都有两套 SDK（Swift 原生与 Objective-C），两套 API 不能混用。 Package, class, and method names differ between platform SDKs for the same capability. In sample code, use the API documented for that platform; never carry one platform's code over to another. On Apple platforms each product ships two SDKs (native Swift and Objective-C) whose APIs must not be mixed.

# Simultaneous Interpretation

> Turn in-meeting simultaneous interpretation on or off and set member languages: each finalized sentence is translated into the languages of the members and synthesized into speech, delivered through the channel message asr_trans; builds on "Transcription"

## Start simultaneous interpretation

`POST /server/v1/interp/start`

Authentication: required (see [Overview](https://docs.stmlink.com/en/rtc/server-api/overview.md))

Start simultaneous interpretation in a channel: each finalized sentence is translated into the languages of the members in the channel and synthesized into speech, delivered through the channel message asr\_trans (with audio\_url).

* Builds on speech recognition: if speech recognition is not yet running in the channel, it is started automatically, and the returned session\_id is the same as from "Start speech recognition"
* Members set their own language with "Set a member's interpretation language"; members who have not set one count as Chinese. Each sentence is translated only into "languages of members in the channel − the speaker's language"
* After it starts, the channel message interp\_enabled is sent (enabled=true; duck\_volume is the volume of the speaker's original voice while the interpretation audio plays), and interp\_enabled / interp\_duck\_volume in the channel properties (props)
  are updated accordingly, so members who join later read the current state from the channel properties
* Repeated calls are idempotent and can be used to switch the AI profile during a meeting; interpretation stops when speech recognition stops
* If the LLM times out or fails to translate into a language, asr\_trans for that language is still sent, with trans\_text set to placeholder text and trans\_error (timeout / error),
  and no audio\_url (nothing is played)

The app's AI profile must include a large language model, otherwise "LLM not configured or not enabled" is returned. If the profile has no speech synthesis, only the translated text is delivered, without audio\_url.

**Request parameters**

**channel** `string` *required*

Channel name
Example: `fire`

**profile** `string`

AI profile name (configured under "AI Services & Profiles" in the admin console). If omitted, the profile in the app's AI settings is used, falling back to the default profile (max length 64)
Example: `default`

Request example:

```json theme={null}
{
  "channel": "fire",
  "profile": "default"
}
```

**Response parameters**

**session\_id** `string`

Recognition session ID (interpretation runs on the transcription session)

**duck\_volume** `number`

Volume the speaker's original voice is lowered to while interpretation audio plays (0\~1, 0 = muted), from the AI profile
Example: `0.2`

Response example:

```json theme={null}
{
  "code": 0,
  "data": {
    "duck_volume": 0.2,
    "session_id": ""
  }
}
```

***

## Stop simultaneous interpretation

`POST /server/v1/interp/stop`

Authentication: required (see [Overview](https://docs.stmlink.com/en/rtc/server-api/overview.md))

Stop simultaneous interpretation in a channel. Speech recognition continues as before (translation falls back to the single-language real-time translation in the app's settings). Returns success even if interpretation is not on.

After it stops, the channel message interp\_enabled (enabled=false) is sent.

**Request parameters**

**channel** `string` *required*

Channel name
Example: `fire`

Request example:

```json theme={null}
{
  "channel": "fire"
}
```

**Response parameters**

`data` is null

Response example:

```json theme={null}
{
  "code": 0,
  "data": null
}
```

***

## Set a member's interpretation language

`POST /server/v1/interp/set-lang`

Authentication: required (see [Overview](https://docs.stmlink.com/en/rtc/server-api/overview.md))

Set a member's interpretation language ("My language"): it decides which language the member's speech is recognized in, and which language other people's speech is translated into for the member.

* Can be set as soon as the channel is open; if interpretation is not on yet, the setting is kept and takes effect when it starts; cleared when the channel is destroyed
* After it is set, the channel message interp\_lang (uid, lang) is sent, which clients use to decide whether to play a given interpretation audio
* While recognition is running, the member's recognition language switches immediately; the last sentence spoken before the switch is still output
* For members who mix Chinese and English when speaking, Chinese is recommended

**Request parameters**

**channel** `string` *required*

Channel name
Example: `fire`

**uid** `string` *required*

Member's user ID (letters, digits, underscores (\_), and hyphens (-) only)
Example: `1001`

**lang** `string`

Language code (zh / en, etc.; regional codes such as zh-CN are treated as zh); empty = restore the default language (max length 16)
Example: `en`

Request example:

```json theme={null}
{
  "channel": "fire",
  "lang": "en",
  "uid": "1001"
}
```

**Response parameters**

`data` is null

Response example:

```json theme={null}
{
  "code": 0,
  "data": null
}
```

***

## Get interpretation status and member languages

`POST /server/v1/interp/langs`

Authentication: required (see [Overview](https://docs.stmlink.com/en/rtc/server-api/overview.md))

Get the channel's interpretation status and member language table. Fetch the full table once on joining, then update incrementally from the channel messages interp\_enabled / interp\_lang.

langs only contains members who have set a language; the others use default\_lang.

**Request parameters**

**channel** `string` *required*

Channel name
Example: `fire`

Request example:

```json theme={null}
{
  "channel": "fire"
}
```

**Response parameters**

**enabled** `boolean`

Whether simultaneous interpretation is on

**duck\_volume** `number`

Volume the speaker's original voice is lowered to while interpretation audio plays (0\~1); 0 when interpretation is off

**default\_lang** `string`

Language used for members who have not set one
Example: `zh`

**langs** `object`

Members who have set a language: uid → language
Example: `{"1001":"en"}`

Response example:

```json theme={null}
{
  "code": 0,
  "data": {
    "default_lang": "zh",
    "duck_volume": 0,
    "enabled": false,
    "langs": {
      "1001": "en"
    }
  }
}
```

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.