{"uid":"cap_mVeXD9hx8PKf45-5-8RUu","slug":"fastapi-online-voice-clone-speech-synthesis-from-reference-audio-4761fe88","name":"fastapi.online Voice Clone (Speech Synthesis from Reference Audio)","description":"Self-hosted AI API gateway. Expensive endpoints require an x402 micropayment (USDC on Base) before executing.","url":"https://api.fastapi.online/voice-clone","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["reference_audio_base64","reference_text","text"],"properties":{"text":{"type":"string","maxLength":5000,"minLength":1,"description":"Text to speak in the cloned voice."},"reference_text":{"type":"string","maxLength":1000,"minLength":1,"description":"Transcript of the reference audio."},"reference_audio_base64":{"type":"string","minLength":16,"description":"Base64 WAV/MP3 of the voice to clone (a few seconds)."}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"format":"wav","audio_base64":"<wav>"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"down","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_TeT04Dt5n5E4XQIg3nZpk","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Clones a speaker's voice from a short reference audio clip and synthesizes new speech from provided text, returning a WAV audio file.","exampleAgentPrompt":"Using my short voice recording (I'll provide it as base64 WAV), clone my voice and generate audio of it saying: 'Welcome to our service, we're glad you're here.' — the transcript of my reference clip is 'Hi there, this is my voice sample.'","exampleUseCases":[{"title":"Personalized voicemail greeting generator","prompt":"I have a 5-second WAV recording of my voice saying 'Hey, this is Jordan, leave a message.' — can you clone my voice and make it say 'Hi, you've reached Jordan's phone, I'm unavailable right now, please leave your name and number after the beep' instead?"},{"title":"Audiobook narration in author's voice","prompt":"I have a base64-encoded MP3 of the author reading a paragraph — the transcript is 'This is the voice of the narrator for this story.' — can you clone that voice and generate audio of it reading: 'Chapter one. The morning sun rose slowly over the quiet valley, casting long golden shadows across the dew-covered grass.'"},{"title":"Multilingual content in original speaker's voice","prompt":"I've got a short WAV clip of our CEO saying 'Hello and welcome to the company' — use that to clone their voice and generate audio of them saying 'Thank you for joining us today for this important announcement about our new product launch.'"}],"resultDescription":"A JSON object containing an 'audio_base64' field with the base64-encoded WAV audio of the synthesized speech in the cloned voice, and a 'format' field confirming the output is WAV.","failureModes":["Reference audio too short or low quality — cloning fails or produces distorted output","Base64 encoding of audio is malformed — returns a 400 or processing error","Text input exceeds 5000 characters — rejected by schema validation","Reference transcript does not match the reference audio — reduced cloning accuracy","Audio format unsupported (non-WAV/MP3) — processing error","Payment of $0.05 USDC not completed — 402 Payment Required response"],"whenToPreferThis":"Choose this endpoint when you need to synthesize speech that mimics a specific person's voice given only a short reference recording — ideal for personalized audio generation, voice preservation, or custom narration. Prefer this over generic TTS endpoints when voice identity matters and you have a reference sample. Best for single-call, pay-per-use scenarios with no signup overhead.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T10:28:40.618Z","isFirstParty":false}