惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Docker
IT之家
IT之家
Microsoft Security Blog
Microsoft Security Blog
博客园 - 司徒正美
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
D
DataBreaches.Net
B
Blog RSS Feed
博客园_首页
The GitHub Blog
The GitHub Blog
I
InfoQ
L
LangChain Blog
G
Google Developers Blog
M
MIT News - Artificial intelligence
美团技术团队
腾讯CDC
V
Visual Studio Blog
aimingoo的专栏
aimingoo的专栏
博客园 - 聂微东
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Apple Machine Learning Research
Apple Machine Learning Research
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
博客园 - 叶小钗

Hacker News - Newest: "AI"

AI can't read an investor deck AI as an attorney? Student uses ChatGPT, Gemini to sue UW over alleged racial discrimination Hacking MCP Servers in AI Systems – The Rug Pull: Tool Changes After Approval GitHub - MeepCastana/KubeezCut: Free Web based video editor Can AI judge journalism? A Thiel-backed startup says yes, even if it risks chilling whistleblowers Coming soon: 10 Things That Matter in AI Right Now DARPA built an AI to fact-check enemy weapons claims What explains heterogeneity in AI adoption? When AI Meets Muscle: Context-Aware Electrical Stimulation Promises a New Way to Guide Human Movements - Department of Computer Science AI Changed How We Build. It Did Not Change What Matters. Linux rules on using AI-generated code - Copilot is OK, but humans must take 'full responsibility for the… Meta spins up AI version of Mark Zuckerberg to engage with employees Code Mode: Let Your AI Write Programs, Not Just Call Tools | TanStack Blog GitHub - Delavalom/graft: Go framework for building AI agents. Type-safe tools, multi-provider (OpenAI, Anthropic, Gemini, Bedrock), zero vendor SDKs. India's TCS tops estimates, says new AI models did not dent services demand Gen Z's fading AI hype Strong feeling: we are in a folded AI reality GitHub - machinarii/total-recall-catalog: A reference catalog of latest knowledge retrieval, memory & RAG systems GitHub - mensfeld/code-on-incus: Give each AI agent its own isolated machine with root, Docker, and systemd. Active defense detects and stops threats automatically.. Quantization, LoRA, and the 8% Problem: Benchmarking Local LLMs for Production AI Iran war: We spoke to the man making Lego-style AI videos that experts say are powerful propaganda Powell, Bessent discussed Anthropic's Mythos AI cyber threat with major U.S. banks GitHub - immartian/bellamem: Persistent belief-graph memory for AI agents. Retrieves decisive context by importance — not recency, not RAG, not /compact. recursive-mode: The Repo-Native Operating System for AI Engineering After the attack on Sam Altman's home, will AI CEO's go on the offensive? The biggest advance in AI since the LLM Opus 4.6 vs GPT 5.4 One Prompt Unity World Generation Test “AI polls” are fake polls Client Challenge Can AI be a 'child of God'? Inside Anthropic's meeting with Christian leaders
GitHub - MatheusSimonaci/clone-talking: Talk to an AI clo...
MatheusSimon · 2026-05-05 · via Hacker News - Newest: "AI"

Talk to AI persona clones from your phone — voice in, voice out.

How It Works · Quick Start · Clones · Architecture · Troubleshooting

Node.js VoiSpark OpenRouter Whisper ngrok MIT License

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

⚡ Real-Time Pipeline

Ultra-low latency WebSocket pipeline. STT → LLM → TTS with no polling.

🧬 Voice Cloning

VoiSpark synthesizes natural, expressive voices — supports celebrity voices and custom clones.

🤖 Any AI Model

Route through OpenRouter: Claude, GPT-4, Llama, Gemini, Mistral — your choice.

📱 Phone-First

Scan a QR code and you're live. No app install. Works on any modern mobile browser.

🎭 Custom Personas

Define any character as a .md file with YAML frontmatter. One file = one clone.

📝 Session Logs

Every conversation saved as structured JSON. Timestamps, roles, full history.

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 install

2. 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

  1. Scan the QR code with your phone
  2. Tap "Allow" when prompted for microphone access
  3. Hold the button and speak
  4. Release to send
  5. 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:

  1. Go to voispark.com and log in
  2. Browse Celebrity Voices or the voice catalog
  3. Select a voice and copy its Project ID
  4. Paste it as the voiceId in 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:

  1. Client records audio and sends it via WebSocket
  2. Whisper transcribes audio to text
  3. OpenRouter LLM generates a response using the clone's system prompt
  4. VoiSpark streams synthesized audio with the clone's voice
  5. Server streams audio chunks back to the client in real time
  6. 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:

  1. Check that ngrok is running — you should see an https://... URL in the terminal
  2. Ensure the QR code links to https:// (not http://)
  3. Reload the page after granting permissions
  4. Try a different browser (Firefox, Edge, Samsung Internet)
No voice output

Problem: Text response appears but no audio plays.

Solution:

  1. Check VOISPARK_API_KEY in .env
  2. Verify the voice project ID at voispark.com — confirm it exists in your account
  3. Check your VoiSpark credit balance
  4. Look at the server terminal for API errors
Slow responses

Problem: Long delay between speaking and hearing a reply.

Solution:

  1. Switch to a faster model: OPENROUTER_MODEL=openai/gpt-4o-mini
  2. Check your internet speed — Whisper and VoiSpark need good bandwidth
  3. 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.