Skip to content

puntorigen/avatar-skills / voice-clone

voice-clone

Unverified

Clone a narrator's voice from a clean voice audio file using MiniMax voice-cloning on Replicate, then generate new speech (TTS) in that cloned voice with MiniMax speech-2.8-hd. Cloning takes the clean voice MP3/WAV (e.g. voice_concat.mp3 from the voice-isolate skill), trains a voice (default speech-2.6-hd) and saves voice_id + a preview under <avatar>/voices/<name>.json. Generation reuses the avatar's trained voice (or trains one if missing), auto-detects the text language for MiniMax's language_boost, supports per-line emotion and expressive interjections ((laughs), (sighs), …) plus manual <#x#> pauses, and saves audio under <avatar>/generated-audios/ with a manifest.json. Use when the user wants to clone a voice, create/train a TTS voice, get a voice_id, or GENERATE speech / narration / audio in a cloned voice, or mentions "clonar la voz", "voice clone", "voice_id", "entrenar la voz", "generar audio", "text to speech", or "TTS con la voz".

FileKindSize
SKILL.mdskill md8.8 KB
requirements.txtmanifest157 B
scripts/_common.pyscript12.9 KB
scripts/clone_voice.pyscript10.5 KB
scripts/elevenlabs_tts.pyscript11.7 KB
scripts/generate_speech.pyscript16.9 KB
scripts/setup_key.pyscript1.6 KB

scripts/setup_key.py

View on GitHub
#!/usr/bin/env python3
"""Store the Replicate API token for the voice-clone skill.

Usage:
    python3 setup_key.py YOUR_REPLICATE_API_TOKEN
    python3 setup_key.py --show

The token is shared with the other Replicate-based skills. If any sibling skill
(avatar-video-reel, gpt-image-2, bg-music, sound-effects, ...) already has a
valid token configured, this skill discovers it automatically and you do not
need to run this. Run it only to set or refresh the token.
"""

import json
import sys
from pathlib import Path

CONFIG_FILE = Path(__file__).parent.parent / "config.json"


def load():
    if CONFIG_FILE.exists():
        try:
            return json.loads(CONFIG_FILE.read_text(encoding="utf-8"))
        except json.JSONDecodeError:
            return {}
    return {}


def save(config):
    CONFIG_FILE.write_text(json.dumps(config, indent=2) + "\n", encoding="utf-8")


def main():
    if len(sys.argv) < 2:
        print(__doc__)
        sys.exit(1)

    if sys.argv[1] == "--show":
        config = load()
        tok = config.get("replicate_api_token", "")
        if tok:
            print(f"replicate_api_token: {tok[:6]}...{tok[-3:]} (len {len(tok)})")
        else:
            print("No token stored in this skill's config (it may be inherited from a sibling skill).")
        return

    token = sys.argv[1].strip()
    if not token.startswith("r8_"):
        print("Warning: Replicate tokens usually start with 'r8_'. Proceeding anyway.", file=sys.stderr)

    config = load()
    config["replicate_api_token"] = token
    save(config)
    print(f"Replicate API token saved to {CONFIG_FILE}")


if __name__ == "__main__":
    main()
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall