According to recent reports, in this blog post, we introduce the idea of a 'voice consent gate' to support voice cloning with consent. We provide an example Space and accompanying code to start the ball rolling on the idea.
Realistic voice generation technology has gotten uncannily good in the past few years. In some situations, it’s possible to generate a synthetic voice that sounds almost exactly like the voice of a real person. And today, what once felt like science fiction is reality: Voice cloning. With just a few seconds of recorded speech, anyone’s voice can be made to say almost anything. (Related: Tech Report: 3D Asset Generation: AI for Game Developme...)
Sources indicate that voice generation, and in particular the subtask of voice cloning, has notable risks and benefits. The risks of “deepfakes”, such as the cloned voice of former President Biden used in robocalls, can mislead people into thinking that people have remarked things that they haven’t said. On the other hand, voice cloning can be a powerful beneficial tool, helping people who’ve lost the ability to speak communicate in their own voice again, or assisting people in learning upcoming languages and dialects. (Related: Trump calls Putin and Xi friends. They have other inten...)
So how do we create meaningful use without malicious use? We’re exploring one possible answer: a voice consent gate. That’s a system where a voice can be cloned only when the speaker explicitly indicates they consent. In other words, the model won’t speak in your voice unless you say it’s okay.
We provide a basic demo of this idea below:.
The voice consent gate is a piece of infrastructure we're exploring that provides methods for ethical principles like consent to be embedded directly into AI system workflows. In our demo, this means the model only starts once the speaker’s consent phrase has been both spoken and recognized, effectively making consent a prerequisite for action. This turns an abstract principle into a concrete system condition, creating a traceable, auditable interaction: an AI model can only run after an unambiguous act of consent.
Recent findings suggest that such design choices matter beyond voice cloning. They illustrate how AI systems can be built to respect autonomy by default, and how transparency and consent can be made functional, not just declarative.
To create a basic voice cloning system with a voice consent gate, you need three parts:.
Our observation: Since some voice-cloning systems can now generate speech similar to a speaker’s voice using just one sentence, a sentence used for consent can also be used for voice cloning.
In a recent development, the consent bit: To create a voice consent gate in an English voice cloning system, generate a short, natural-sounding English utterance (~20 words) for a person to read aloud that clearly states their informed consent in the current context. We recommend explicitly including a consent phrase and the model name, such as “I give my consent to use the < MODEL > voice cloning model with my voice”. We also recommend using an audio recording that cannot be uploaded, but that instead comes directly from a microphone, to make sure that the sentence isn’t part of an earlier recording that’s been manipulated. Pairing this with a novel (previously unsaid) sentence further helps to directly index the current consent context - supporting explicit, active, context-specific, informed consent. While this design reduces risks of reusing prior recordings, it’s not foolproof; a person could still generate a matching phrase using another TTS system. Future iterations could explore lightweight audio provenance checks, speaker-embedding similarity, or metadata from real-time capture to help verify that the consent audio originates from the intended speaker.
The suitable-for-voice-cloning bit: Previous work on voice cloning has shown that the phrases provided by the speaker must have phonetic variety, covering diverse vowels and consonants; have a “neutral” or polite tone, without background noise and with the speaker in a comfortable position; and have a clear start and end (i.e., don’t trim the clip mid-word).
To enact both of these aspects within the demo, we prompt a language model to create pairs of sentences: one expressing explicit consent, and another neutral sentence that adds phonetic diversity (covering different vowels, consonants, and tones). Each prompt utilizes a randomly-chosen everyday topic (like the weather, food, or music) to keep the sentences varied and comfortable to say, aiding in creating recordings that are clear, natural, and phonetically rich, while also containing an unambiguous statement of consent. This generation step is automated rather than pre-written so that each user receives a unique sentence pair, preventing reuse of the same text and ensuring that consent recordings are specific to the current session. In other words, the language model generates two fresh sentences per consent instance: one for explicit consent and one for phonetic variety. For example, the language model might generate: “I give my consent to use my voice for generating audio with the model EchoVoice. The weather is bright and calm this morning.” This approach ensures that every sample used for cloning contains verifiable, explicit consent, while remaining suitable as technical input for high-quality voice synthesis. (Note: It's not required that the language model be a "large" language model, which brings its own consent issues.).
Once the speaker’s input matches the generated text, the voice cloning system can start, using the speaker’s consent audio as the input.
There are a few options for doing this, and we’d love to hear further ideas. For now, there’s:.
You can copy the code to suit your own use.
Recent findings suggest that the code is modular so it can be sliced and diced in different ways to incorporate into your own projects. We’ll be working on making this more robust and secure over time, and we’re curious to hear your ideas on how to improve.
In a recent development, handled responsibly, this technology doesn’t have to haunt us. It can instead become a respectful collaboration between humans and machines — no ghosts in the machine, just good practice. 🎃.
Not a massive fan of trying to legislate every problem away but if malicious deep fakes are already illegal in most jurisdictions it seems that malicious voice cloning ought to be too.
I think the problem with enforcement will be offshore usage (i.e. if a person from country X is illegally using a voice clone of a person from country Y, how will enforcement work?), as has already been shown with widespread global IP misuse. The second glitch is going to be detection. Who is going to check that every single AI voice was or was not cloned with consent? Anything that would truly prevent misuse with robust checks would probably stifle the ability to iterate and develop promptly and anything that didn't stifle the ability to iterate and develop quickly probably wouldn't truly prevent misuse. The classic regulatory Catch-22.
It's problems like these that kind of necessitate a global response and whilst I'm usually not one to advocate for supranational law-making, it would be nice to see the so-called international community create a joint response or at least initiative on this topic because it's going to be a brutal wake-up call one day.
At this point even just outreach and education on this topic would be helpful. In my time working with random developers and others in the OSS community, I've come across several suspicious requests from people I hardly know asking me for seemingly random recordings of my voice. Someone who doesn't understand the potential for misuse might provide such a recording and inadvertently have their voice used in scam campaigns.
I have tested it in local... its wonderful... We have to extend it to all the languages.
In a recent development, @ZennyKenny 's point about suspicious voice recording requests hits home. We're living in an era where 'Can you say something for my ringtone?' has become the new 'Can I borrow your SSN for a second?' The consent gate approach at least makes the ask more obvious: 'Hey, can you explicitly consent to me cloning your voice while reading this phonetically diverse sentence about coffee?' Much harder to slip that one past someone!
Industry observers note that I saw your project and found it very interesting. I tried to contribute to it by adding a multilingual support and local sentence generation (with ollama and llama3:8b) and voice cloning using XTTS v2. I uploaded the code on GitHub, you can find it here: https://github.com/faridgnank02/voice-cloning.
Please let me know how you feel about it.
Very interesting! But couldn't the consent by bypassed using another voice cloning model that doesn't require verification? E.g. use that to generate the verification audio.