Skip to main content

agent-translator

Local real-time speech-to-speech translation for Intel AI PCs. Microphone in, translated speech and live captions out — every model runs locally via OpenVINO and PyTorch CPU. No cloud calls.

The pipeline is: audio capture → FSMN-VAD sentence segmentation → streaming Paraformer ASR (with an optional Qwen3-ASR pass on the iGPU) → Hunyuan-1.8B translation on the iGPU, falling back to Opus-MT on CPU → MeloTTS synthesis, pushed to a bundled WebSocket + HTTP web UI.

This package is the reusable core of the local-realtime-translator AI skill.

Install

pip install agent-translator

On Linux, add --extra-index-url https://download.pytorch.org/whl/cpu unless you want the CUDA build of torch — it is several GB and the pipeline does not use it. On Windows this is unnecessary: PyPI's torch wheels are CPU-only there.

torch is pinned to 2.4.1 (newer builds fail to initialize c10.dll on a clean Intel AI PC) and transformers to >=4.57,<4.58 (5.x silently makes Hunyuan return empty translations). Those pins cap the package at Python 3.12.

Use

from agent_translator import config
from agent_translator.live_pipeline import LivePipeline

config.configure(
    assets_root=r"C:\Users\me\.openvino\assets\my-app",
    output_dir=r"C:\Users\me\.openvino\temp\my-app\output",
)

pipeline = LivePipeline(src_lang="zh", tgt_lang="en")
pipeline.start()
try:
    ...  # the web UI is served while the pipeline runs
finally:
    pipeline.stop()

Models are expected to already be on disk under config.MODELS_ROOT; the skill downloads them from ModelScope before starting the pipeline.

Configuration

Runtime locations are host-owned. Set them with config.configure(...) in-process, or with environment variables when the pipeline runs in a child process:

Setting Env var Default
MODELS_ROOT AGENT_TRANSLATOR_MODELS_ROOT %USERPROFILE%\.openvino\models
ASSETS_ROOT AGENT_TRANSLATOR_ASSETS_ROOT %USERPROFILE%\.openvino\assets\local-realtime-translator
SKILL_ROOT AGENT_TRANSLATOR_SKILL_ROOT unset
OUTPUT_DIR AGENT_TRANSLATOR_OUTPUT_DIR %USERPROFILE%\.openvino\temp\local-realtime-translator\output

SKILL_ROOT, when set and carrying an nltk_data/ pack, makes that copy win over the downloaded one — that is how a source checkout keeps working offline.

Everything else in agent_translator.config is a tuning constant (sample rates, VAD thresholds, model ids) you can override by assignment before loading.

License

Apache-2.0.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agent_translator-0.1.0-py3-none-any.whl (67.6 kB view details)

Uploaded Python 3

File details

Details for the file agent_translator-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agent_translator-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 05a0273e0574ec698f9fcebfd90a0810c64770e8907d7c6b021c30ec9c1d6525
MD5 c882a5e40acfe3eb5af3c9430896cb4e
BLAKE2b-256 a054df3f551906f37a95be380aee6d4da102dd506943ec0e38e650e0548aab4b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page