Talk to AI persona clones from your phone — voice in, voice out.
How It Works · Quick Start · Clones · Architecture · Troubleshooting
What is Clone Talking?
Clone Talking is a voice AI web app that brings personas to life. Run a server on your PC, scan a QR code with your phone, hold a button to speak, and the AI responds in a cloned voice — in real time.
Whether you want to chat with Elon Musk, a custom mentor, or any fully custom persona you create — it's just a few taps away. No app installation. No cloud hosting. Just your PC and your phone.
How It Works
┌─────────────┐
│ Your Phone │ Scan QR code → browser opens
└──────┬──────┘
│ Hold button → speak → release to send
▼
┌──────────────────┐
│ Express Server │
│ + WebSocket │
└────┬─┬─┬────────┘
│ │ │
▼ ▼ ▼
┌───────────────────────┐
│ Whisper (OpenAI) │ Audio → Text
│ OpenRouter LLM │ Text → Response
│ VoiSpark TTS │ Text → Cloned Voice
└──────────┬────────────┘
▼
┌─────────────┐
│ Your Phone │ Plays audio response
│ (Speaker) │ Saves conversation log
└─────────────┘
Features
Prerequisites
- Node.js 18+
- Android phone with Chrome — or any modern browser supporting Web Audio API
- 4 API keys (all have free tiers):
| Service | Purpose | Get Key |
|---|---|---|
| OpenRouter | LLM routing (any model) | openrouter.ai/keys |
| OpenAI | Whisper speech-to-text | platform.openai.com/api-keys |
| VoiSpark | Text-to-speech with voice cloning | voispark.com → Settings → API Tokens |
| ngrok | HTTPS tunnel for mobile mic | dashboard.ngrok.com |
Quick Start
1. Clone and install
git clone https://github.com/MatheusSimonaci/clone-talking.git
cd clone-talking
npm install2. Configure environment
cp .env.example .env
Edit .env with your keys:
OPENROUTER_API_KEY=your-key-here OPENROUTER_MODEL=anthropic/claude-sonnet-4-5 OPENAI_API_KEY=your-key-here VOISPARK_API_KEY=your-key-here VOISPARK_PROVIDER=fish-audio VOISPARK_MODEL_ID=s1 NGROK_AUTHTOKEN=your-token-here
3. Run the interactive setup
npm start
The wizard will:
- List all available clones
- Ask for a VoiSpark voice ID (saved automatically for future runs)
- Start the server on
localhost:3000 - Open an ngrok HTTPS tunnel
- Display a QR code in your terminal
4. Scan and chat
- Scan the QR code with your phone
- Tap "Allow" when prompted for microphone access
- Hold the button and speak
- Release to send
- Listen as the AI responds in its cloned voice
Environment Variables
| Variable | Required | Description | Example |
|---|---|---|---|
OPENROUTER_API_KEY |
Yes | LLM routing key | sk-or-v1-... |
OPENROUTER_MODEL |
Yes | Model to use | anthropic/claude-sonnet-4-5 |
OPENAI_API_KEY |
Yes | Whisper STT key | sk-proj-... |
VOISPARK_API_KEY |
Yes | TTS + voice cloning | your-voispark-key |
VOISPARK_PROVIDER |
No | TTS provider (default: fish-audio) |
fish-audio |
VOISPARK_MODEL_ID |
No | Provider model (default: s1) |
s1 |
NGROK_AUTHTOKEN |
Yes | HTTPS tunnel token | ...your-token... |
PORT |
No | Server port (default: 3000) | 3000 |
Why ngrok? Android Chrome requires HTTPS for microphone access. ngrok creates a free encrypted tunnel to your local server — no certificate setup needed.
Clone System
Clones are the heart of Clone Talking. Each clone is a persona — a character with its own voice, personality, and expertise.
How clones work
Clones live in the clones/ directory as Markdown files. Each file has:
- YAML frontmatter — metadata (
id,name,description,voiceId) - Markdown body — the system prompt (instructions for the AI)
When you chat with a clone, the file body becomes the LLM's system prompt.
Clone file format
--- id: elon-musk name: Elon Musk description: Strategic mentor — First Principles, The Algorithm, Maniacal Urgency voiceId: b43a971a-f770-41fe-8afd-d245423ee75a --- You are Elon Musk — entrepreneur, engineer, and strategic mentor. Apply first principles thinking. Question every requirement. Delete before building.
| Field | Required | Description |
|---|---|---|
id |
Yes | Unique identifier — used in npm start -- elon-musk |
name |
Yes | Display name shown in the setup wizard |
description |
Yes | Short description shown in the setup wizard |
voiceId |
No | VoiSpark voice project ID — saved automatically if left empty |
Adding a custom clone
cat > clones/my-mentor.md << 'EOF' --- id: my-mentor name: My Mentor description: A custom strategic advisor persona. voiceId: "" --- You are a sharp, direct strategic advisor. Give concise, actionable answers. Ask clarifying questions before diving in. EOF
Then run it:
npm start -- my-mentor
On first run, the wizard will ask for a VoiSpark voice ID. It saves automatically.
Voice IDs (VoiSpark)
Each clone needs a VoiSpark Voice ID — identifies a celebrity voice or custom clone.
How to get a Voice ID:
- Go to voispark.com and log in
- Browse Celebrity Voices or the voice catalog
- Select a voice and copy its Project ID
- Paste it as the
voiceIdin your clone's frontmatter or enter it during setup
How voices are stored:
Voice IDs are saved automatically in .voice-config.json (gitignored):
{
"elon-musk": { "voiceId": "b43a971a-f770-41fe-8afd-d245423ee75a" }
}You can also edit .voice-config.json directly, or set a voiceId in the clone's frontmatter as a default.
Usage
# Interactive mode — pick from menu npm start # Direct mode — skip wizard npm start -- elon-musk # Raw Node.js node src/server.js elon-musk
Model Selection
Any model on OpenRouter works. Set OPENROUTER_MODEL in .env.
| Model | Speed | Quality | Cost | Best For |
|---|---|---|---|---|
anthropic/claude-sonnet-4-5 |
Fast | Excellent | $$ | Default — best balance |
anthropic/claude-opus-4 |
Slow | Best-in-class | $$$$ | Complex reasoning |
openai/gpt-4o |
Medium | Very good | $$$ | Multimodal tasks |
openai/gpt-4o-mini |
Very fast | Good | $ | Budget-friendly |
google/gemini-flash-1.5 |
Very fast | Good | $ | Speed-critical |
meta-llama/llama-3.1-70b-instruct |
Fast | Very good | $ | Open-source |
Architecture
Client (Browser)
│
│ WebSocket
│
Express Server (server.js)
│
├─→ Whisper API (OpenAI) ← Audio → Text
│
├─→ OpenRouter (any LLM) ← Text → Response
│
├─→ VoiSpark TTS API ← Text → Cloned Voice (streamed)
│
└─→ ngrok Tunnel ← HTTPS for mobile mic access
Pipeline flow:
- Client records audio and sends it via WebSocket
- Whisper transcribes audio to text
- OpenRouter LLM generates a response using the clone's system prompt
- VoiSpark streams synthesized audio with the clone's voice
- Server streams audio chunks back to the client in real time
- Logger saves the full exchange to a session JSON file
Session Logs
Every conversation is automatically saved to logs/:
logs/session-2026-03-28-15-30-00.json
{
"sessionId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"cloneFile": "clones/elon-musk.md",
"voiceId": "b43a971a-f770-41fe-8afd-d245423ee75a",
"model": "anthropic/claude-sonnet-4-5",
"startedAt": "2026-03-28T15:30:00.000Z",
"messages": [
{
"role": "user",
"content": "What is the theory of relativity?",
"timestamp": "2026-03-28T15:30:05.123Z"
},
{
"role": "assistant",
"content": "Ah, a wonderful question! Allow me to explain E=mc²...",
"timestamp": "2026-03-28T15:30:08.456Z"
}
]
}The logs/ directory is gitignored.
Troubleshooting
Microphone not working on Android
Problem: Android Chrome asks for permission but mic doesn't activate.
Solution:
- Check that ngrok is running — you should see an
https://...URL in the terminal - Ensure the QR code links to
https://(nothttp://) - Reload the page after granting permissions
- Try a different browser (Firefox, Edge, Samsung Internet)
No voice output
Problem: Text response appears but no audio plays.
Solution:
- Check
VOISPARK_API_KEYin.env - Verify the voice project ID at voispark.com — confirm it exists in your account
- Check your VoiSpark credit balance
- Look at the server terminal for API errors
Slow responses
Problem: Long delay between speaking and hearing a reply.
Solution:
- Switch to a faster model:
OPENROUTER_MODEL=openai/gpt-4o-mini - Check your internet speed — Whisper and VoiSpark need good bandwidth
- Verify your OpenRouter API key has credits
QR code changes every restart
Problem: ngrok assigns a new URL each restart (free tier).
Solution: This is normal on the free plan. Scan the new QR code each session. Upgrade to a paid ngrok plan for a fixed domain.
Ethical Use
Clone Talking is a tool for creative, educational, and entertainment purposes. Voice cloning is powerful technology — use it responsibly.
The following uses are strictly prohibited:
- ❌ Fraud & impersonation — cloning someone's voice without consent to deceive others
- ❌ Scams — using AI voices to impersonate real people in financial or social engineering attacks
- ❌ Non-consensual content — generating voice content with a real person's likeness without their explicit permission
- ❌ Harassment — using cloned voices to harass, defame, or harm individuals
- ❌ Disinformation — creating fake audio attributed to real people to spread false information
By using this project, you agree to comply with all applicable laws and the terms of service of each API provider (VoiSpark, OpenRouter, OpenAI, ngrok). The author is not responsible for any misuse of this software.
If you witness abuse, report it to the relevant platform or authority.
Contributing
Clone Talking is open source. Contributions welcome!
- Found a bug? Open an issue
- Have an idea? Submit a pull request
- Want to share a clone? Add it to
clones/and open a PR
License
MIT License. See LICENSE for details.
Built with Node.js · Express · WebSocket · OpenAI Whisper · OpenRouter · VoiSpark
Talk to anyone. From anywhere. Voice first.


























