Tunes and Voices.
Chenzi Xu · chenzi.xu@ntu.edu.sg
The weekly notebooks were the revision.
Break until 10:40; we go through the answers when we return.
Weight: 20% of the course grade. This is the last quiz.
The quiz is done.
Back at 10:40.
When we return: the answers to the quiz, then the lecture: the tune of a sentence, and whose voice it is.
1. FastSpeech 2 takes phones in. What does it predict before drawing the mel?
how long each phone lasts, and the pitch and energy of each frame
2. A TTS model can copy a voice from a few seconds of audio without retraining. What are the two ways?
a speaker vector (like SpeechT5's voice vector in last week's notebook), or a prompt that an audio language model (such as VALL-E) continues
3. How did last week's notebook check whether a question rises?
pitch over the last 100 ms of voicing against the sentence's median, in semitones
How the voice rises and falls over a phrase: a final rise, a final fall, a peak on one word
How long each syllable lasts, and where the pauses fall: lengthening marks stress and phrase ends
Stressed and accented syllables are louder; function words are quieter
End of “The shop is open …”, in semitones from each sentence's median
Teal: the sentence ends below its median. Synthetic voices, made in advance; the end is the last 100 ms of voicing.
f1 = the starting pitch, f2 = the ending pitch, both in Hz
Coral: a rise; teal: a fall. Each value computed from the formula. In the practical, this formula is the one line of code you write.
The tune says how it is meant.
The voice says who is saying it.
Nothing in the model checks whose voice it is: any check has to be added by people.
In Singapore, a recording can be personal data under the PDPA if a person can be identified from it (PDPC advisory guidelines, revised 2024).
Cloned-voice robocalls went out before the New Hampshire primary. The FCC fined the consultant US$6 million.
An Arup employee paid out after a call with fake senior colleagues, voices included.
Deepfakes of Lee Hsien Loong (as PM, then as Senior Minister) and of PM Lawrence Wong, often a cloned voice over real footage.
A free voice clone passed the bank's phone voice ID; the bank also asked for his date of birth.
Headlines written for this slide; the links open the original reports.
Ask the speaker first, in writing
Apple Personal Voice builds only your own voice; the US actors' union (SAG-AFTRA) requires consent and pay
Gap: only honest users ask
Hide a watermark in the audio, or attach a signed label of where it came from
AudioSeal (2024); C2PA labels
Gap: labels can be stripped; watermarks attacked
A classifier checks whether the speech is synthetic
the ASVspoof challenge, since 2015
Gap: much worse on generators it has not seen
Penalties and takedowns, which also deter
US FCC (2024): AI voices in robocalls need consent; Singapore (2024 Act): no faked candidates online during an election; EU AI Act: marking from Aug 2026
Gap: slow, and stops at borders
Each closes one gap. Together they raise the cost of misuse; none makes it impossible.
Voice banking once needed 350 to 1,600 recorded phrases; now 10 can be enough.
The less audio a voice needs, the easier it is for patients, and for scammers.
A start-up trains a “Singapore English” voice on hundreds of hours of local podcasts, without asking the speakers.
A made-up case.
The pitch, duration and loudness patterns of speech above the level of single phones, across syllables, words and phrases; in J&M's words, “the use of F0, energy, and duration to convey pragmatic, affective, or conversation-interactional meanings”.
Jurafsky & Martin, Speech and Language Processing (3rd ed. draft), ch. 15 §15.3 (Aug 2026 draft; §14.3 in the Jan 2026 release).The rise and fall of F0 over a phrase, used to signal meanings such as statement versus question, focus and attitude; a final rise on a yes-no question is called a question rise.
Course wording. J&M ch. 15 §15.3.3 “Tune” (Aug 2026 draft).Making a speech synthesizer speak in a particular person's voice from recordings of that person; zero-shot cloning does it from a few seconds of audio, without retraining the model.
Course wording. Jia et al. (2018); Wang et al. (2023), VALL-E.Agreement, given freely and in advance, by a person who understands what their voice will be used for, by whom, for how long, and how to withdraw.
Course wording. NAVA (2026), voice actors' AI contract terms; SAG-AFTRA (2023); EU GDPR Art. 7 (withdrawal).A voice goes from 180 Hz to 270 Hz at the end of a sentence. How many semitones is that? Would it count as a rise?
A TTS model reads “You're leaving?” and “You're leaving.” the same way. What has it missed, and which one number would show it?
Why does a model trained to be close on average produce a flat tune? Give one way to get the tune back.
A model clones any voice from a 6-second clip. Name two harms it makes easier, and one safeguard for each.
Worked answers are in the appendix.
1. Prosody (pitch, duration, loudness) carries meaning the words do not: question or statement, focus, phrasing, attitude; Singapore English particles carry theirs partly in pitch
2. TTS voices often get the words right and the tune wrong: one text allows many tunes, and a model trained on averages flattens them
3. Measure a tune in semitones: 12 × log2(f2/f1), the end of the sentence against its median
4. A few seconds of audio can clone a voice; consent, watermarks, detection and law each help, and none is enough alone
Why MOS is indispensable and flawed. isca-archive.org/ssw_2019/wagner19_ssw.html
Skim the taxonomy figure; read two case studies. arxiv.org/abs/2402.01708
On voice banking: a synthetic voice built for one person. ted.com/talks/rupal_patel_synthetic_voices_as_unique_as_fingerprints
§1 and the speaker-embedding plots. arxiv.org/abs/1806.04558
Prominence, phrasing and tune, in under three pages. web.stanford.edu/~jurafsky/slp3
Measure the tune.
Yours first, then the machine's.
Open the Week 12 notebook (link on NTULearn) in Colab and run the setup cell; it works at home too.
On your phone, record “You paid for the kopi.” and “You paid for the kopi?”; name the files statement and question.
MMS runs live; SpeechT5 and Kokoro clips are made in advance.
A synthetic voice can say anything.
Ask whose voice it is, and who agreed.
Jurafsky, D. & Martin, J. H. Speech and Language Processing, 3rd ed. draft, ch. 15 §15.3 “Prosody” (Aug 2026; §14.3 in the Jan 2026 release).
Lim, L. (2007). “Mergers and acquisitions: on the ages and origins of Singapore English particles.” World Englishes 26(4), 446–473.
Soh, Y. Q., Lee, J. & Tan, Y.-Y. (2022). “Ethnicity and tone production on Singlish particles.” Languages 7(3), 243. meh with a high level tone.
Wang, Y., Stanton, D., Zhang, Y., et al. (2018). “Style tokens: unsupervised style modeling, control and transfer in end-to-end speech synthesis.” ICML 2018. Averaged prosody.
Ren, Y., Hu, C., Tan, X., et al. (2021). “FastSpeech 2: Fast and high-quality end-to-end text to speech.” ICLR 2021. arXiv:2006.04558.
W3C (2010). Speech Synthesis Markup Language (SSML) Version 1.1. W3C Recommendation, 7 September 2010.
Pratap, V., Tjandra, A., Shi, B., et al. (2024). “Scaling speech technology to 1,000+ languages.” JMLR 25(97). MMS.
Ao, J., Wang, R., Zhou, L., et al. (2022). “SpeechT5: Unified-modal encoder-decoder pre-training for spoken language processing.” ACL 2022. Kokoro-82M (hexgrad, 2024), Apache-2.0.
Mauch, M. & Dixon, S. (2014). “pYIN: a fundamental frequency estimator using probabilistic threshold distributions.” ICASSP 2014.
Wang, C., Chen, S., Wu, Y., et al. (2023). “Neural codec language models are zero-shot text to speech synthesizers.” arXiv:2301.02111. VALL-E.
Qwen Team (2026). “Qwen3-TTS technical report.” arXiv:2601.15621; model cards on Hugging Face (Apache-2.0).
Kyutai (13 Jan 2026). “Pocket TTS” (blog and model card). Microsoft (2025). VibeVoice GitHub README, entry of 5 Sept 2025 (TTS code removed after misuse).
Jia, Y., Zhang, Y., Weiss, R. J., et al. (2018). “Transfer learning from speaker verification to multispeaker text-to-speech synthesis.” NeurIPS 2018.
PDPC Singapore (2024). Advisory Guidelines on the PDPA for Selected Topics, revised 23 May 2024. Recordings as personal data.
Wagner, P., Beskow, J., Betz, S., et al. (2019). “Speech synthesis evaluation: state-of-the-art assessment and suggestion for a novel research program.” Proc. SSW 10, 105–110.
Hutiri, W., Papakyriakopoulos, O. & Xiang, A. (2024). “Not my voice! A taxonomy of ethical and safety harms of speech generators.” FAccT 2024, 359–376.
FCC (2024). Declaratory Ruling FCC 24-17, 8 Feb 2024 (AI voices in robocalls); forfeiture order against S. Kramer, 26 Sept 2024.
CNN (16 May 2024). Arup revealed as the victim of a US$25 million deepfake scam. The Straits Times via The Star (29 Dec 2023; 2 June 2024) and Bernama via The Star (7 Mar 2025): deepfakes of Singapore's leaders.
Cox, J. (23 Feb 2023). “How I broke into a bank account with an AI-generated voice.” Vice.
San Roman, R., Fernandez, P., Elsahar, H., et al. (2024). “Proactive detection of voice cloning with localized watermarking.” ICML 2024. AudioSeal.
C2PA (2026). Content Credentials deployment guidance. Coalition for Content Provenance and Authenticity.
Müller, N. M., Czempin, P., Dieckmann, F., et al. (2022). “Does audio deepfake detection generalize?” Interspeech 2022. ASVspoof: asvspoof.org.
Singapore (2024). Elections (Integrity of Online Advertising) (Amendment) Act 2024 (No. 34 of 2024), in force 22 Jan 2025. EU AI Act, Regulation (EU) 2024/1689, Art. 50.
SAG-AFTRA (2023). TV/Theatrical agreement: digital replica provisions. NAVA (2026). “Synthetic/AI voices.” navavoices.org. EU GDPR Art. 7.
Patel, R. (2013). “Synthetic voices, as unique as fingerprints.” TEDWomen. RCSLT (2020). Voice banking factsheet.
Apple (16 May 2023; 13 May 2025). Newsroom: Personal Voice. 9to5Mac (19 Mar 2026): 150 prompts before iOS 26, 10 since. Fox 9 (25 July 2024): Rep. Jennifer Wexton's speech in an AI-cloned voice.
12 × log2(270 / 180) = 12 × log2(1.5) ≈ +7.0 semitones. Yes: a large rise, more than half an octave.
It has missed the intonation: in “You're leaving?” only a final rise makes it a question. The one number: the question's end minus the statement's end (each the last 100 ms against the sentence's median), in semitones; it should be clearly positive.
The same text appears with different tunes in training; the tune that is closest to all of them on average is their average, which rises and falls less than a typical reading. To get it back: predict pitch explicitly and edit it (FastSpeech 2), copy the style of a reference recording, or mark it in the text with SSML.
For example: scam calls in a relative's voice (safeguard: call back on a number you know; consent checks in the product) and fake statements by a politician (safeguard: watermarks and signed records of where a file came from; election laws against deepfakes). Bank voice logins (safeguard: a second factor) also work.