Convert any text to natural-sounding speech with premium AI voices. Free to use, with optional upgrades for HD quality.
- 🆓 Free tier with browser-native voices
- 🎙️ Premium voices via ElevenLabs integration
- 💳 Stripe billing for subscriptions
- 🤖 ChatGPT integration via Custom GPT Actions
- 🔧 Claude integration via MCP (Model Context Protocol)
- ⚡ Vercel-ready for instant deployment
# Clone the repo
git clone https://github.com/varterm/platform.git
cd varterm
# Install dependencies
npm install
# Copy environment variables
cp .env.example .env.local
# Run development server
npm run devOpen http://localhost:3000 to see the app.
LICENSEuses MIT for permissive reuse.CONTRIBUTING.mdexplains setup, checks, and PR expectations.CODE_OF_CONDUCT.mdsets collaboration standards.SECURITY.mdexplains private vulnerability reporting..github/ISSUE_TEMPLATEincludes structured bug and feature forms..github/pull_request_template.mdstandardizes PR quality..github/workflows/ci.ymlruns lint and tests on PRs/pushes.- Extension release automation lives in the
varterm/extensionsrepository.
Binary build artifacts are intentionally not committed to git.
Create a .env.local file with:
# Required for premium voices
ELEVENLABS_API_KEY=your_elevenlabs_api_key
# Optional: AI answers for /api/ask
ANTHROPIC_API_KEY=your_anthropic_api_key
# Optional: protect /api/ingest and /api/ask with bearer auth
VARTERM_EXTENSION_API_TOKEN=your_private_token
# Optional: Stripe for billing
STRIPE_SECRET_KEY=sk_live_...
STRIPE_WEBHOOK_SECRET=whsec_...
# Your domain
NEXT_PUBLIC_BASE_URL=https://varterm.comOr via CLI:
npm i -g vercel
vercel- Go to Stripe Dashboard → Payment Links
- Create 3 recurring products:
- Starter: $5/month
- Pro: $15/month
- Unlimited: $29/month
- Copy each payment link URL
- Update
STRIPE_LINKSinapp/page.js:
const STRIPE_LINKS = {
starter: 'https://buy.stripe.com/your_starter_link',
pro: 'https://buy.stripe.com/your_pro_link',
unlimited: 'https://buy.stripe.com/your_unlimited_link',
};List available voices.
Convert text to speech.
Request:
{
"text": "Hello world",
"voice": "Sarah",
"speed": 1.0
}Response: audio/mpeg binary data
MCP server info and capabilities.
Handle MCP tool calls for Claude integration.
Create a temporary document session for long text/script ingestion with chunking limits.
Request:
{
"documents": [
{
"path": "src/app.ts",
"content": "very long file text..."
}
],
"options": {
"chunkSize": 1800,
"overlap": 250,
"maxChunks": 2000,
"maxTotalChars": 1000000
}
}Ask a question against an ingest session.
Request:
{
"sessionId": "uuid",
"question": "Where is auth validated?",
"maxChunks": 8,
"maxContextChars": 15000
}- Go to chat.openai.com/gpts/editor
- Create a new GPT
- Add these instructions:
You have access to Varterm, a text-to-speech service. When users want to hear text read aloud, use the textToSpeech action. You can also list available voices with listVoices.
Always ask what voice they prefer if they don't specify one. Popular choices are Sarah (warm), Charlie (friendly), and Rachel (ultra realistic).
- In the Actions section, click "Create new action"
- Import the OpenAPI schema from:
https://varterm.com/openapi.json - Save and publish your GPT
User: Read this paragraph aloud using a British voice
GPT: I'll use George's British voice for this. [calls textToSpeech]
Here's the audio: [plays audio]
Add this to your Claude Desktop config (~/.config/claude/claude_desktop_config.json):
{
"mcpServers": {
"varterm": {
"transport": {
"type": "http",
"url": "https://varterm.com/api/mcp"
}
}
}
}For local development or if you have your own ElevenLabs key:
- Install MCP SDK:
npm install @modelcontextprotocol/sdk- Add to Claude Desktop config:
{
"mcpServers": {
"varterm": {
"command": "node",
"args": ["/path/to/varterm/mcp-server.js"],
"env": {
"ELEVENLABS_API_KEY": "your_key_here"
}
}
}
}- Restart Claude Desktop
| Tool | Description |
|---|---|
text_to_speech |
Convert text to audio with optional voice and speed |
list_voices |
List all available voices |
User: Can you read this article summary aloud?
Claude: I'll convert that to speech for you. [uses text_to_speech tool]
Done! I've generated audio using Sarah's voice. The audio file is ready.
varterm/
├── app/
│ ├── api/
│ │ ├── tts/
│ │ │ └── route.js # TTS API endpoint
│ │ └── mcp/
│ │ └── route.js # MCP endpoint for Claude
│ ├── globals.css
│ ├── layout.js
│ ├── page.js # Main app
│ └── page.module.css
├── lib/
│ └── elevenlabs.js # ElevenLabs integration
├── public/
│ └── openapi.json # OpenAPI spec for GPT Actions
├── mcp-server.js # Standalone MCP server
├── package.json
└── README.md
| Plan | Price | Characters | Voices |
|---|---|---|---|
| Free | $0 | Unlimited | Browser voices |
| Starter | $5/mo | 50,000 | 10 premium |
| Pro | $15/mo | 200,000 | 30+ premium |
| Unlimited | $29/mo | Unlimited | All 50+ Ultra HD |
- Framework: Next.js 14
- TTS Provider: ElevenLabs
- Payments: Stripe Payment Links
- Deployment: Vercel
- AI Integrations: OpenAI GPT Actions, Claude MCP
MIT © Varterm
Built with ❤️ for readers everywhere.
