Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions livekit-agents/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ speechify = ["livekit-plugins-speechify>=1.6.4"]
speechmatics = ["livekit-plugins-speechmatics>=1.6.4"]
spitch = ["livekit-plugins-spitch>=1.6.4"]
tavus = ["livekit-plugins-tavus>=1.6.4"]
tencent = ["livekit-plugins-tencent>=1.6.4"]
trugen = ["livekit-plugins-trugen>=1.6.4"]
turn-detector = ["livekit-plugins-turn-detector>=1.6.4"]
ultravox = ["livekit-plugins-ultravox>=1.6.4"]
Expand Down
79 changes: 79 additions & 0 deletions livekit-plugins/livekit-plugins-tencent/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Tencent Cloud plugin for LiveKit Agents

Support for streaming speech-to-text with Tencent Cloud ASR and text-to-speech
with Tencent Cloud TTS.

## Installation

```bash
pip install livekit-plugins-tencent
```

## Authentication

Set the Tencent Cloud ASR credentials in your environment:

```bash
TENCENT_ASR_APP_ID=...
TENCENT_ASR_SECRET_ID=...
TENCENT_ASR_SECRET_KEY=...
```

Set the Tencent Cloud TTS credentials separately:

```bash
TENCENT_TTS_APP_ID=...
TENCENT_TTS_SECRET_ID=...
TENCENT_TTS_SECRET_KEY=...
```

## ASR Usage

```python
from livekit.agents import AgentSession
from livekit.plugins import tencent

session = AgentSession(
stt=tencent.STT(),
)
```

With explicit options:

```python
from livekit.plugins import tencent

stt = tencent.STT(
engine_model_type="16k_zh_en",
vad_silence_time=500,
max_speak_time=15000,
)
```

Tencent Cloud ASR currently supports streaming recognition in this plugin. Batch
recognition via `recognize()` is not implemented.

## TTS Usage

```python
from livekit.agents import AgentSession
from livekit.plugins import tencent

session = AgentSession(
tts=tencent.TTS(),
)
```

With explicit options:

```python
from livekit.plugins import tencent

tts = tencent.TTS(
voice_type=601010,
codec="pcm",
sample_rate=24000,
speed=0.0,
volume=0.0,
)
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Copyright 2026 LiveKit, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Tencent Cloud plugin for LiveKit Agents.

Support for speech-to-text with Tencent Cloud ASR and text-to-speech with
Tencent Cloud TTS.
"""

from livekit.agents import Plugin

from .log import logger
from .stt import STT, SpeechStream
from .tts import TTS, ChunkedStream, SynthesizeStream
from .version import __version__

__all__ = ["STT", "SpeechStream", "TTS", "ChunkedStream", "SynthesizeStream", "__version__"]


class TencentPlugin(Plugin):
def __init__(self) -> None:
super().__init__(__name__, __version__, __package__, logger)


Plugin.register_plugin(TencentPlugin())

_module = dir()
NOT_IN_ALL = [m for m in _module if m not in __all__]

__pdoc__ = {}

for n in NOT_IN_ALL:
__pdoc__[n] = False
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import logging

logger = logging.getLogger("livekit.plugins.tencent")
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Loading
Loading