Voice Cloning - HFStudio
Sample script to read

I consent to cloning my voice. {sampleTexts[currentSampleIndex]}

{#if isRecording}
{/if}

Record your voice for at least 15 seconds to create a voice clone. To prevent unauthorized voice cloning, you must start by clearly saying "I consent to cloning my voice" — the rest of the text is arbitrary. Try reading the sample above.

{#if !isLoggedIn && showLoginPrompt}

Hugging Face PRO

Sign in to with your Hugging Face PRO account to get started with $2 of free API credits per month. You can add a billing method for additional pay-as-you-go usage ⤴

{/if}
{#if sessionRecordings.length === 0}

Pick a recording to clone

No recordings yet

{:else}
{#each sessionRecordings as recording, i}
Recording {i + 1}
{recording.timestamp.toLocaleTimeString()}
{/each}
{/if}
{#if selectedRecording} {#if isRecordingLongEnough(selectedRecording)} ✓ {:else} ✗ {/if} {:else} ✓ {/if} at least 15 seconds {#if selectedRecording && transcriptionStatus[selectedRecording.id]} {#if hasConsent(selectedRecording)} ✓ {:else} ✗ {/if} {:else} ✓ {/if} includes consent
{#if selectedRecording && transcriptionStatus[selectedRecording.id]}

"{transcriptionStatus[selectedRecording.id].first_words}..."

{/if} {#if successMessage && selectedRecording && uploadResults[selectedRecording.id]}

Your voice has been saved to a temporary URL for 24 hours and will be automatically deleted. You can now use it for text-to-speech generation.

{:else if successMessage}

{successMessage}

{/if}
{#if isLoggedIn && userVoices.length > 0}

Your existing voice clone

{#each userVoices as voice}
{voice.voice_name}
Expires: {new Date(voice.expires_at).toLocaleDateString()} at {new Date( voice.expires_at ).toLocaleTimeString()}
{/each}
{/if}
{#if showErrorModal}

{errorMessage}

An error occurred while processing your request

{#if errorDetails}

Error Details:

{errorDetails}
{/if}
{/if}