agentsclimarketplace

Hub translation

Skill ZhangHanDong/dora-skills/skills/hub-translation

"Use for translation nodes in dora.From its SKILL.md

Install
npx -y skills add ZhangHanDong/dora-skills --skill hub-translation

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 7 stars7 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

4.7 KB, as published. Nobody here has run it

Translation Nodes

Translate text between languages using neural machine translation

Available Translation Methods

Note: Dedicated translation nodes are not yet in node-hub. Use LLM-based translation with dora-qwen or dora-qwen2-5-vl.

MethodInstallDescription
dora-qwenpip install dora-qwenLLM-based translation
dora-transformerspip install dora-transformersHuggingface models

LLM-Based Translation with dora-qwen

Use Qwen LLM for translation tasks.

YAML Configuration

- id: translate
  build: pip install dora-qwen
  path: dora-qwen
  inputs:
    text: whisper/text
  outputs:
    - text
  env:
    SYSTEM_PROMPT: "You are a translator. Translate the following text from English to Chinese. Output only the translation."

Supported Languages

Qwen supports translation between most major language pairs including:

  • English, Chinese, Japanese, Korean
  • German, French, Spanish, Portuguese
  • And many more

dora-transformers (Custom Model)

Use Huggingface translation models via dora-transformers.

YAML Configuration

- id: translate
  build: pip install dora-transformers
  path: dora-transformers
  inputs:
    text: input/text
  outputs:
    - text
  env:
    MODEL: Helsinki-NLP/opus-mt-en-zh
    TASK: translation

Features

  • Use any Huggingface translation model
  • Support for Opus-MT, M2M100, NLLB models
  • Offline inference supported

Real-Time Translation Pipeline

nodes:
  # Microphone
  - id: microphone
    build: pip install dora-microphone
    path: dora-microphone
    inputs:
      tick: dora/timer/millis/100
    outputs:
      - audio

  # VAD
  - id: vad
    build: pip install dora-vad
    path: dora-vad
    inputs:
      audio: microphone/audio
    outputs:
      - audio

  # Speech to text
  - id: whisper
    build: pip install dora-distil-whisper
    path: dora-distil-whisper
    inputs:
      input: vad/audio
    outputs:
      - text
    env:
      TARGET_LANGUAGE: english

  # Translation (using LLM)
  - id: translate
    build: pip install dora-qwen
    path: dora-qwen
    inputs:
      text: whisper/text
    outputs:
      - text
    env:
      SYSTEM_PROMPT: "Translate to Chinese:"

  # TTS for translated text
  - id: tts
    build: pip install dora-kokoro-tts
    path: dora-kokoro-tts
    inputs:
      text: translate/text
    outputs:
      - audio

  # Speaker
  - id: speaker
    build: pip install dora-pyaudio
    path: dora-pyaudio
    inputs:
      audio: tts/audio

  # Visualization
  - id: rerun
    build: pip install dora-rerun
    path: dora-rerun
    inputs:
      original:
        source: whisper/text
        metadata:
          primitive: "text"
      translated:
        source: translate/text
        metadata:
          primitive: "text"

Multi-Language Translation

Use multiple dora-qwen instances with different translation prompts:

nodes:
  - id: input
    build: pip install terminal-input
    path: terminal-input
    outputs:
      - text

  # English to Chinese
  - id: en_to_zh
    build: pip install dora-qwen
    path: dora-qwen
    inputs:
      text: input/text
    outputs:
      - text
    env:
      SYSTEM_PROMPT: "Translate the following text to Chinese. Output only the translation."

  # English to Japanese
  - id: en_to_ja
    build: pip install dora-qwen
    path: dora-qwen
    inputs:
      text: input/text
    outputs:
      - text
    env:
      SYSTEM_PROMPT: "Translate the following text to Japanese. Output only the translation."

  # English to Spanish
  - id: en_to_es
    build: pip install dora-qwen
    path: dora-qwen
    inputs:
      text: input/text
    outputs:
      - text
    env:
      SYSTEM_PROMPT: "Translate the following text to Spanish. Output only the translation."

  - id: rerun
    build: pip install dora-rerun
    path: dora-rerun
    inputs:
      original: input/text
      chinese: en_to_zh/text
      japanese: en_to_ja/text
      spanish: en_to_es/text

Text Data Format

Input/Output

import pyarrow as pa

# Send text for translation
text = "Hello, how are you?"
node.send_output("text", pa.array([text]))

# Receive translated text
translated = event["value"][0].as_py()

Related Skills

  • hub-audio - Speech-to-text for voice translation
  • hub-llm - Language models
  • hub-visualization - Display original and translated text

Keep looking

Skills are one crate of 607,533. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.