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.

Metadata

Release files for agent-translator 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for agent-translator 0.1.1
File Interpreter ABI Platform Actions
agent_translator-0.1.1-py3-none-any.whl Python 3 none any Details for agent_translator-0.1.1-py3-none-any.whl

Release files / agent_translator-0.1.1-py3-none-any.whl

Download URL agent_translator-0.1.1-py3-none-any.whl
Size 71.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f4b33db735fa6d3b3e9c457b8bf4521fb12c7274193698019451216be1bc6dff
BLAKE2b-256 checksum
How to use checksums
486144457062a321b80942450ccfe720679025d0fb0900abe435a7b5e6be4338
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.13

Security for agent-translator 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file No provenance

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