Ask HN: My wife might lose the ability to speak in 3 weeks – how to prepare?
My wife will be undergoing significant oral surgery in a few weeks and there is a SMALL chance she may lose the ability to speak. I'd like to prepare, just in case, to have technology to reproduce her voice from keyboard or other input.
My ideal would be an open source "deepfake toolkit" that allows me to provide pre-recorded samples of her speech and then TTS in her voice. Unfortunately most articles and tools I'm finding are anti-deepfake. Any recommendations?
Fallback would be recording her speaking "phonetic pangrams" and then using her pre-recorded phonemes to recreate speech that sounds like her. I feel like the deepfake toolkit is the way to go. Appreciate any recommendations... There must be open source tools for this??
228 comments
[ 3.6 ms ] story [ 113 ms ] threadhttps://speech.microsoft.com/customvoice
I imagine if MS offers custom voices then the other text to speech providers do as well.
Good luck
That way, you can retrain an existing AI to do text to speech with her own voice.
Edit: here's a link to the corpus that I believe Mozilla uses http://www.openslr.org/12/
'This AI Clones Your Voice After Listening for 5 Seconds'
I believe some speakers only recorded 1-2 hours, which seems doable.
It might make sense to consider making a recording that is more meaningful, and focus on giving her emotional support rather than building an AI that could be perceived as a replacement.
That very well seems to be the OP's position as well. That's a far more generous reading of the situation. It makes sense that someone here would have the mindset of "lets keep a backup in case we want access to it later."
This paper introduces a new corpus of read English speech, suitable for training and evaluating speech recognition systems.
http://www.danielpovey.com/files/2015_icassp_librispeech.pdf
I think OP would ideally want the model to pick up on more natural intonation, instead of monotone dictation. Record everything from now on, as best you can with similar recording context, and hopefully that data will be enough to cover more natural nuances.
We cannot rule out she wants to spend quality time with her partner instead of spending time in a recording studio, so that, if the worst outcome comes, her husband can remind her of what she lost.
She can, but she might not. A lot of that depends on how he presents the idea to her -- it might seem like something that's important to him.
Honestly there is no doubt a very large emotional/personal side of this, irrespective of who's idea it is and who supports it.
Technology isn't the solution for all problems and challenges in life.
But good lord, sometimes trying to get technical help on the Internet turns into this rabbithole of people who are specifically looking for ways not to be helpful. "Did you really want that?" "Did you consider alternatives?" "What you really have is an XY problem."
#1 item from https://www.molfar.io/blog/yc-questions
Sometimes a cigar is just a cigar.
He then goes on to say "My ideal would be an open source 'deepfake toolkit' that allows me to provide pre-recorded samples of her speech and then TTS in her voice."
That sounds like wanting to capture and simulate someone's voice.
Literally the only person on this thread who knows anything about the OP's wife is the OP. Everyone else sharing an opinion on "the emotional side of this" is vocally ignorant.
I'd make no presumption, good or bad, about the their relationship dynamic, however.
And it's particularly useless when your worries are about a situation which does not concern you and which you are almost completely ignorant about.
The sentiment is admirable, but it's a lot of work considering that the probability of a negative outcome is very low.
I'm not sure there's a correlation to other senses, I can't see for my future self or move on his behalf. I suppose there are things I would want to taste or smell if I was going to lose those senses, but those are experiences for me, not things I'd use to communicate with loved ones.
After losing my voice in an accident, I'd be willing to spend many, many hours transcribing my own speech in the handful of scratchy family videos, voicemails, and phone logs of ordinary conversations. If I could spend a couple days prior to the event reading some books, a TTS training corpus, or anniversary/birthday/wedding/etc greetings and congratulations into a microphone and have a personal text-to-speech voice I'd be all over that.
It would be a little weird if someone else used it as their narrator, but that's not OP's goal.
Speaking of recording books and training corpuses, my grandparents (who have their voices) got a special kind of joy from reading children's books that they once read to me and that I once heard as a child to their new grandson. OP, if you and your wife have or might have kids (and she can handle it emotionally), it might be nice to record video/audio of reading children's books to future grandchildren. Even if your future grandchild knows that grandma can't read books out loud, I'd bet Grandma would be happy to silently turn the pages for a toddler on her lap until those digital recordings got worn and scratchy like an old VHS.
Recording audio and then choosing not to use it later is fine.
Not recording it because I don't want it right now... maybe fine? maybe sad.
This is less of a problem with modern high-quality mics than it was, say, with answering machines 30 years ago. Your voice might still sound not exactly the same, but it hopefully shouldn't be unbearably grating either.
It's because reproduced audio doesn't have the bass the same as you hearing it conducted through your jawbone (though of course this will sound too bassy to everyone else!)
At one end is ASL, which its own language as you said, although with some influence from English).
On the opposite end are things like Signed Exact English that reproduce English verbatim on the hands, borrowing from ASL in some places and inventing signs in other places. For example, ASL has no sign for -ed (the past tense ending) because it marks aspect instead of tense, so SEE invented a sign for it.
And in the middle is Contact Sign or Pidgin Signed English, a sort of compromise between ASL and English grammar, which is most used when ASL speakers and non-fluent speakers communicate. You might get a mix of some ASL topic-comment word order with some English subject-verb-object word order. You'l get a lot less "simultaneous" ASL grammar like indicating the subject or object pronoun using eye gaze, or conjugating verbs by changing motion, because those are hard for non-fluent ASL speakers to understand. You'll also get a lot less of the SEE constructs like explicit -ed markings, because they're usually obvious from context.
Not a huge shock, since you also get this between two sole English speakers communicating vocally.
The romance languages were taught in English, with a strong focus on the rules. Progress was extremely slow. I've had opportunities to practice Spanish and Italian, and that's been way more helpful than those classes ever were (and let's be honest, Spanish and Italian are too similar for my muddled brain and "communication" is more of a negotiation). I've heard from quite a few students of French that after 4 years of formal study, they can't speak a lick. I didn't hang on that long.
ASL is often taught immersively. You might have an interpreter for the first day or the first week, but after that, it's voices off (and if you're lucky, your instructor is Deaf). You start with letters, to bootstrap from English, and mimeing, because that forms a basis for a lot of informal ASL. Subsequent vocabulary is communicated through a combination of fingerspelling and mime. Grammar is considered a fairly advanced topic; and by the time your teacher gets around to that, you'll have absorbed more of it than you realize.
In my experience, learning ASL is more akin to riding a bike, than learning a romance language -- much less Chinese.
The fact that you had formal language classes in romance languages doesn't mean that's the only way romance languages can be taught or learned. You can learn or teach any language however you want. Some ways are more effective; some are less effective.
One reason students can't speak any French after taking four years of school French is that effectiveness isn't really a goal of the instruction (or of the students).
Fortunately the effort can be done anytime after the fact, so if she is lucky it might not be done at all.
What the fuck, man?
Recording a message to a yet unborn grandchild is maybe something we could all do!
We have a lot of tapes around of his voice, from voice mails to family videos to some things from his work. If you are open to reaching out that would be awesome, I’ll check out the site as well.
Edit: I’ve wanted to make some sort of soundboard + “text to talk” setup for this family member. He often can’t participate in conversations because he writes on a whiteboard, and the speed of chatter moves faster than his writing
We also have an API that you might find useful for the soundboard project: https://app.resemble.ai/docs
Out of interest what are the average response times to generate a clip of one or two sentences from a configured voice?
Imagining the easy text-to-speech solution the OP could build on this resemble API.
It’s a bit dated at this point, but I imagine the research has vastly improved since then.
It’s a very good question though. A decade ago this was able to be done for one man. Is it now possible to be done for anyone? Like others, I’d guess the first step is to record everything while you can.
We also used the Verbally premium iPad app to help give him a voice and make transactions on easier.
Wishing you all the best.
Also the model is not saved in the browser with Colab so you might also want to do it locally to save it eventualy (if it comes to that).
All the best mate!
[0] Main repo: https://github.com/CorentinJ/Real-Time-Voice-Cloning [1] Google colab repo to try it out: https://github.com/CorentinJ/Real-Time-Voice-Cloning/blob/ma...
The paper https://arxiv.org/abs/1904.05441 has a list of spoofing methods.
Here's one method as paper https://arxiv.org/pdf/1806.04558.pdf
And here on GitHub https://github.com/CorentinJ/Real-Time-Voice-Cloning
The only tip I have is from a bit of amateur sound editing I did: collect many samples, and beware of big phrases: Like, ask her to say the same thing many times. And ... sometimes ... to ... stop ... at ... each ... word. And ... so ... me ... ti ... mes at each syllable.
Otherwise, if you ever need to create a sample that contains a single word/syllable, you cant. It is weird how much sound that contains clearly distinguishable syllables for the human ears still is not separable when you go to edit it.
Also, you might want to check wordlists by frequency to get a menu of common words, and ipa notation, to ensure you cover a good range of sounds
Don’t know why you’re being downvoted. Thought it was insightful.
> We evaluated our Kennedy results qualitatively along the following dimensions: ... naturalness of the composited articulation; ...
Obviously the state of the art will have advanced, but maybe this can point the way toward more current research.
While I tend to agree with everyone else that this can be a great idea, my instinct is to float the idea to your wife first and see how she responds. I can imagine someone taking this negatively.
https://www.youtube.com/channel/UCID5qusrF32kSj-oSGq3rJg/vid...
The voice cloning can be done in a matter of minutes. (< an hour) Its also very easy to use the website.
Best of luck!
If you want to read up on the basics, check out the SV2TTS paper: https://arxiv.org/pdf/1806.04558.pdf Basically you use a speaker encoding to condition the TTS output. This paper/idea is used all over, even for speech-to-speech translation, with small changes.
There's a few open-source version implementations but mostly outdated--the better ones are either private for business or privacy reasons.
There's a lot of work on non-parallel transfer learning (aka subjects are saying different things) so TTS has progressed rapidly and most public implementations lag a bit behind the research. If you're willing to grok speech processing, I'd start with NeMo for overall simplicity--don't get distracted by Kaldi.
Edit: Important note! Utterances are usually clipped of silence before/after so take that into account when analyzing corpus lengths. The quality of each utterance is much much more important than the length--fifteen.ai's TTS is so good primarily because they got fans of each character to collect the data.
But obviously also attend to the human matters as well, eg spend time.
On the upside, your father can choose any celebrity he wants to voice him! Tons of celeb data is publicly available (VoxCeleb 1 & 2).
(Not using his voice synth, reconstructed using ML, because it should sound more natural that way ;-)
https://clinton.presidentiallibraries.us/items/show/16112 https://youtu.be/orPUQm1ZRSI
And his voice was his - even with the American accent.
https://www.news.com.au/technology/innovation/why-stephen-ha...
> “It is the best I have heard, although it gives me an accent that has been described variously as Scandinavian, American or Scottish.”
> ...
> “It has become my trademark and I wouldn’t change it for a more natural voice with a British accent.
> “I am told that children who need a computer voice want one like mine.”
Somewhere, I recall a NOVA(?) program from the mid 80s where it showed him using the speech synthesizer and the thing that he said with it that still sticks in my mind is the "please excuse my American accent". In later years he was given the opportunity to upgrade it to a more natural sounding voice - but that voice was his.
It would not surprise me if SGI’s software implementation were similar to the he most popular hardware of the 1980s.
https://theweek.com/articles/769768/saving-stephen-hawkings-...
Something like: - Download these texts - Record in WAV at least 48 kHz - Record each line in a separate file. - Do 3 takes of each line: flat, happy, despair
Maybe even a minimal set and a full set depending on how much effort you are willing to put in.
A plain description on how to capture a raw base which within reason and technology could be used as a baseline for the most common toolkits.
I have myself looked into this (for fun) but I felt I needed a very good understanding of the toolkits before even starting to feed in data. And for my admittedly unimportant use it seemed a huge investment to create a corpus I was not even confident would work. I ended up taking the low road and used an existing voice.
https://github.com/daanzu/speech-training-recorder
The recorder works with Python 3.6.10. Need to pip install webrtcvad also.
I've been wanting to create a TTS of myself so I can take phone calls using headphones and type back what I want to say so that I don't have to yell private information out loud in public locations. Would be nice if during non-COVID times I could sit in a train seat and take phone calls completely silently.
Here's a recent work that has a good comparison of some vocoders: https://wavenode-example.github.io/
Edit: WaveRNN struck a good balance for me in the past but is not shown in the link. Tons of new work coming out though!
I'm not sure what's up with the WaveGLOW (17.1M) example in the linked wavenode comparison... The base WaveGLOW sounds reasonable, though. They're also using all female voices, which strikes me as dodgy; lower male voice pitch tracking is often harder to get right, and a bunch of comparisons without getting into harder cases or failure modes makes it seem like they're covering something up.
(I've run into a bunch of comparisons for papers in the past where they clearly just did a bad job of implementing the prior art. There should be a special circle of hell...)
I'm looking at you GAN papers.
I would say also consider recording a variety of honest utterances of all kinds, situations, and emotions. Anger outbursts, apathetic grunts, sexual even if you so desire (hence throwaway account)... Please dont be offended by this, just thinking of all scenarios for you to decide for yourself...
You can set it up yourself with a bit of Python knowledge from this branch: https://github.com/talonvoice/noise/tree/speech-dataset
There are keyboard shortcuts - up/down/space to move through the list and record quickly.
If you want to use it on arbitrary text prompts, you can modify this function to return each line from a text file: https://github.com/talonvoice/noise/blob/speech-dataset/serv...
If you use this, before recording too much, do some test recordings and make sure they sound ok. Web audio can be unreliable in some browsers.
The uploaded files are named after the short name, so make sure you can correspond the short name with the original text prompts, eg with string_to_shortname().
If you aren’t easily able to do this yourself, I’d be happy to spin up an instance of it for you with text prompts of your choosing.
Also, I noted the VLC demo says it doesn't use DNS! That's awesome...
The VLC demo was using macos speech recognition. In the beta now I’m shipping my own engine+trained models based on Facebook’s wav2letter, which is going pretty well.
https://github.com/daanzu/speech-training-recorder
Originally intended for recording data for training speech recognition models [0], it should work just as well for recording to be used for speech synthesis.
[0] https://github.com/daanzu/kaldi-active-grammar
Is that something that would be useful to a researcher in any context? I am intrigued by the idea of having my voice preserved (you know, ego), but also am happy to donate the sound files if they would help researchers in any way for datasets.
If so: chris@theamphour.com
In general, yes, this is probably useful data in some way for speech recognition or TTS.
Later, you can extract all the phonemes you want from it and you will retain the emotional expressiveness of her voice.
She should probably sing some songs -- lullabies, rock, etc. Go for emotional diversity.