journal article·2023-01-31Open access

A Linear Memory CTC-Based Algorithm for Text-to-Voice Alignment of Very Long Audio Recordings

Guillaume Doras, Yann Teytaut, Axel Roebel

Applied Sciences· Volume 13· Issue 3

Abstract

Synchronisation of a voice recording with the corresponding text is a common task in speech and music processing, and is used in many practical applications (automatic subtitling, audio indexing, etc.). A common approach derives a mid-level feature from the audio and finds its alignment to the text by means of maximizing a similarity measure via Dynamic Time Warping (DTW). Recently, a Connectionist Temporal Classification (CTC) approach was proposed that directly emits character probabilities and uses those to find the optimal text-to-voice alignment. While this method yields promising results, the memory complexity of the optimal alignment search remains quadratic in input lengths, limiting its application to relatively short recordings. In this work, we describe how recent improvements brought to the textbook DTW algorithm can be adapted to the CTC context to achieve linear memory complexity. We then detail our overall solution and demonstrate that it can align text to several hours of audio with a mean alignment error of 50 ms for speech, and 120 ms for singing voice, which corresponds to a median alignment error that is below 50 ms for both voice types. Finally, we evaluate its robustness to transcription errors and different languages.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Time Series Analysis and Forecasting · Music and Audio Processing · Speech Recognition and Synthesis

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Analysis/Synthesis Team - STMS UMR 9912, IRCAM, Sorbonne University, CNRS, French Ministry of Culture 1, Place Igor Stravinsky, 75004 Paris, France

Funding

French National Research Agency (Agence Nationale de la Recherche—ANR) as part of the ARS project

References (68)

Show source-provided references
1. Error bounds for convolutional codes and an asymptotically optimum decoding algorithm10.1109/TIT.1967.1054010 ↗
2. A general method applicable to the search for similarities in the amino acid sequence of two proteins10.1016/0022-2836(70)90057-4 ↗
3. Speech discrimination by dynamic programming10.1007/BF01074755 ↗
4. Automatic recognition of 200 words10.1016/S0020-7373(70)80008-6 ↗
5. Minimum prediction residual principle applied to speech recognition10.1109/TASSP.1975.1162641 ↗
6. Comparison of musical sequences10.1007/BF00117340 ↗
7. Orio, N., and Schwarz, D. (2001, January 17–22). Alignment of monophonic and polyphonic music to a score. Proceedings of the International Computer Music Conference (ICMC), Havana, Cuba.
8. Müller, M., Kurth, F., and Clausen, M. (2005, January 11–15). Audio Matching via Chroma-Based Statistical Features. Proceedings of the ISMIR (International Society for Music Information Retrieval), London, UK.
9. Beat Tracking with Dynamic Programming10.1080/09298210701653344 ↗
10. Serrà, J., and Gómez, E. (2007). A cover song identification system based on sequences of tonal descriptors. MIREX (Music Information Retrieval Evaluation eXchange), Citeseer.
11. Wagner, M. (April, January 30). Automatic labelling of continuous speech with a given phonetic transcription using dynamic programming algorithms. Proceedings of the IEEE International Conference on Acoustics, Speech, and Signal Processing (ICASSP’81), Atlanta, GA, USA.
12. Leung, H., and Zue, V. (1984, January 19–21). A procedure for automatic alignment of phonetic transcriptions with continuous speech. Proceedings of the IEEE International Conference on Acoustics, Speech, and Signal Processing (ICASSP’84), San Diego, California, USA.
13. Ljolje, A., and Riley, M. (1991, January 14–17). Automatic segmentation and labeling of speech. Proceedings of the IEEE International Conference on Acoustics, Speech, and Signal Processing, Toronto, ON, Canada.10.1109/ICASSP.1991.150379 ↗
14. Placeway, P., and Lafferty, J. (1996, January 3–6). Cheating with imperfect transcripts. In Proceeding of Fourth International Conference on Spoken Language Processing (ICSLP’96), Philadelphia, PA, USA.10.21437/ICSLP.1996-536 ↗
15. Moreno, P.J., Joerg, C., Thong, J.M.V., and Glickman, O. (December, January 30). A recursive algorithm for the forced alignment of very long audio segments. Proceedings of the Fifth International Conference on Spoken Language Processing, Sydney, Australia.
16. Hazen, T.J. (September, January 17–). Automatic alignment and error correction of human generated transcripts for long speech recordings. Proceedings of the Ninth International Conference on Spoken Language Processing, Pittsburgh, PA, USA.
17. Katsamanis, A., Black, M., Georgiou, P.G., Goldstein, L., and Narayanan, S. (2011, January 29–31). SailAlign: Robust long speech-text alignment. Proceedings of the Workshop on New Tools and Methods for Very-Large Scale Phonetics Research, Philadelphia, PA, USA.
18. Anguera, X., Perez, N., Urruela, A., and Oliver, N. (2011, January 11–15). Automatic synchronization of electronic and audio books via TTS alignment and silence filtering. Proceedings of the 2011 IEEE International Conference on Multimedia and Expo, Barcelona, Spain.10.1109/ICME.2011.6012185 ↗
19. Hoffmann, S., Pfister, B., and Text-to-speech alignment of long recordings using universal phone models (2023, January 31). INTERSPEECH. Available online: https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=c2de617d6eeb82cba0fe7e1453d4ab9a354d3d78.
20. Ruiz, P., Álvarez, A., and Arzelus, H. (2014, January 26–31). Phoneme similarity matrices to improve long audio alignment for automatic subtitling. Proceedings of the Ninth International Conference on Language Resources and Evaluation (LREC), Reykjavik, Iceland.
21. Álvarez, A., Arzelus, H., and Ruiz, P. (2014, January 4–9). Long audio alignment for automatic subtitling using different phone-relatedness measures. Proceedings of the 2014 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Florence, Italy.10.1109/ICASSP.2014.6854812 ↗
22. Probabilistic kernels for improved text-to-speech alignment in long audio tracks10.1109/LSP.2015.2505140 ↗
23. Gupta, C., Yılmaz, E., and Li, H. (2020, January 4–8). Automatic Lyrics Alignment and Transcription in Polyphonic Music: Does Background Music Help?. Proceedings of the ICASSP 2020—2020 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Barcelona, Spain.10.1109/ICASSP40776.2020.9054567 ↗
24. Acoustic modeling using deep belief networks10.1109/TASL.2011.2109382 ↗
25. Graves, A., Mohamed, A.r., and Hinton, G. (2013, January 26–31). Speech recognition with deep recurrent neural networks. Proceedings of the 2013 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Vancouver, BC, Canada.10.1109/ICASSP.2013.6638947 ↗
26. Hannun, A., Case, C., Casper, J., Catanzaro, B., Diamos, G., Elsen, E., Prenger, R., Satheesh, S., Sengupta, S., and Coates, A. (2014). Deep speech: Scaling up end-to-end speech recognition. arXiv.
27. Kelley, M.C., Tucker, B.V., and A comparison of input types to a deep neural network-based forced aligner (2023, January 31). Interspeech 2018. Available online: https://era.library.ualberta.ca/items/0fbd7532-1105-4641-9e12-ebb0e349e460/download/169d5d27-d3a6-411e-ad6d-320032130103.
28. Forced-alignment of the sung acoustic signal using deep neural nets
29. Schulze-Forster, K. (2021). Informed Audio Source Separation with Deep Learning in Limited Data Settings. [Ph.D. Thesis, Institut Polytechnique de Paris].
30. Phoneme level lyrics alignment and text-informed singing voice separation10.1109/TASLP.2021.3091817 ↗
31. Graves, A., Fernández, S., Gomez, F., and Schmidhuber, J. (2006, January 25–29). Connectionist temporal classification: Labelling unsegmented sequence data with recurrent neural networks. Proceedings of the 23rd International Conference on Machine Learning, Pittsburgh, PA, USA.10.1145/1143844.1143891 ↗
32. Graves, A., and Jaitly, N. (2014, January 21–26). Towards end-to-end speech recognition with recurrent neural networks. Proceedings of the International Conference on Machine Learning, Beijing, China.
33. Collobert, R., Puhrsch, C., and Synnaeve, G. (2016). Wav2letter: An end-to-end convnet-based speech recognition system. arXiv.
34. Zhang, Y., Pezeshki, M., Brakel, P., Zhang, S., Bengio, C.L.Y., and Courville, A. (2017). Towards end-to-end speech recognition with deep convolutional neural networks. arXiv.10.21437/Interspeech.2016-1446 ↗
35. Hori, T., Watanabe, S., Zhang, Y., and Chan, W. (2017). Advances in joint CTC-attention based end-to-end speech recognition with a deep CNN encoder and RNN-LM. arXiv.10.21437/Interspeech.2017-1296 ↗
36. Hybrid CTC/attention architecture for end-to-end speech recognition10.1109/JSTSP.2017.2763455 ↗
37. Kim, S., Hori, T., and Watanabe, S. (2017, January 5–9). Joint CTC-attention based end-to-end speech recognition using multi-task learning. Proceedings of the 2017 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), New Orleans, Lousiana, USA.10.1109/ICASSP.2017.7953075 ↗
38. Stoller, D., Durand, S., and Ewert, S. (2019). End-to-end Lyrics Alignment for Polyphonic Music Using an Audio-to-Character Recognition Model. arXiv.10.1109/ICASSP.2019.8683470 ↗
39. Kürzinger, L., Winkelbauer, D., Li, L., Watzel, T., and Rigoll, G. (2020, January 7–9). CTC-segmentation of large corpora for german end-to-end speech recognition. Proceedings of the International Conference on Speech and Computer, Online.10.1007/978-3-030-60276-5_27 ↗
40. Tralie, C., and Dempsey, E. (2020). Exact, parallelizable dynamic time warping alignment with linear memory. arXiv.
41. Stoller, D., Ewert, S., and Dixon, S. (2018). Wave-u-net: A multi-scale neural network for end-to-end audio source separation. arXiv.
42. Vaglio, A., Hennequin, R., Moussallam, M., Richard, G., and d’Alché Buc, F. (2020, January 4–8). Audio-Based Detection of Explicit Content in Music. Proceedings of the ICASSP 2020—2020 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Barcelona, Spain.10.1109/ICASSP40776.2020.9054278 ↗
43. Vaglio, A., Hennequin, R., Moussallam, M., and Richard, G. (2021, January 7–12). The words remain the same—Cover detection with lyrics transcription. Proceedings of the ISMIR (International Society for Music Information Retrieval), Online.
44. Vaglio, A., Hennequin, R., Moussallam, M., Richard, G., and d’Alché Buc, F. (2020, January 11–15). Multilingual lyrics-to-audio alignment. Proceedings of the ISMIR (International Society for Music Information Retrieval), Montréal, Canada.
45. Meseguer-Brocal, G., Cohen-Hadria, A., and Peeters, G. (2018, January 23–27). DALI: A large Dataset of synchronized Audio, LyrIcs and notes, automatically created using teacher-student machine learning paradigm. Proceedings of the 19th International Society for Music Information Retrieval Conference, Paris, France.
46. Teytaut, Y., and Roebel, A. (September, January 30). Phoneme-to-audio alignment with recurrent neural networks for speaking and singing voice. Proceedings of the Interspeech 2021; International Speech Communication Association ISCA, Brno, Czechia.10.21437/Interspeech.2021-1676 ↗
47. Salais, L., Arias, P., Le Moine, C., Rosi, V., Teytaut, Y., Obin, N., and Roebel, A. (2022, January 18–22). Production Strategies of Vocal Attitudes. Proceedings of the Interspeech 2022, Incheon, Korea.10.21437/Interspeech.2022-10947 ↗
48. Le Moine, C., and Obin, N. (2020). Att-HACK: An Expressive Speech Database with Social Attitudes. Speech Prosody. arXiv.10.21437/SpeechProsody.2020-152 ↗
49. Teytaut, Y., Bouvier, B., and Roebel, A. (2022, January 18–22). A study on constraining Connectionist Temporal Classification for temporal audio alignment. Proceedings of the Interspeech 2022, Incheon, Korea.10.21437/Interspeech.2022-10940 ↗
50. Yi, B.K., Jagadish, H.V., and Faloutsos, C. (1998, January 23–27). Efficient retrieval of similar time sequences under time warping. Proceedings of the 14th International Conference on Data Engineering, Orlando, FL, USA.
51. Kim, S.W., Park, S., and Chu, W.W. (2001, January 2–6). An index-based approach for similarity search supporting time warping in large sequence databases. Proceedings of the 17th International Conference on Data Engineering, Heidelberg, Germany.
52. Exact indexing of dynamic time warping10.1007/s10115-004-0154-9 ↗
53. Rakthanmanon, T., Campana, B., Mueen, A., Batista, G., Westover, B., Zhu, Q., Zakaria, J., and Keogh, E. (2012, January 12–16). Searching and mining trillions of time series subsequences under dynamic time warping. Proceedings of the 18th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Beijing, China.10.1145/2339530.2339576 ↗
54. Dynamic programming algorithm optimization for spoken word recognition10.1109/TASSP.1978.1163055 ↗
55. Chu, S., Keogh, E., Hart, D., and Pazzani, M. (2002, January 11–13). Iterative deepening dynamic time warping for time series. Proceedings of the 2002 SIAM International Conference on Data Mining, Arlington, VA, USA.10.1137/1.9781611972726.12 ↗
56. Toward accurate dynamic time warping in linear time and space10.3233/IDA-2007-11508 ↗
57. An efficient multiscale approach to audio synchronization
58. Tsai, T., Tjoa, S.K., Müller, M., and Make Your Own Accompaniment: Adapting Full-Mix Recordings to Match Solo-Only User Recordings (2023, January 31). ISMIR. Available online: https://www.audiolabs-erlangen.de/content/05-fau/professor/00-mueller/03-publications/2017_TsaiTM_Accompaniment_ISMIR.pdf.
59. Dixon, S., Widmer, G., and MATCH: A Music Alignment Tool Chest (2023, January 31). ISMIR. Available online: http://www.cp.jku.at/research/papers/dixon_ismir_2005.pdf.
60. Dixon, S. (2005, January 20–22). Live tracking of musical performances using on-line time warping. Proceedings of the 8th International Conference on Digital Audio Effects, Madrid, Spain.
61. Macrae, R., Dixon, S., and Accurate Real-time Windowed Time Warping (2023, January 31). ISMIR. Available online: http://www.eecs.qmul.ac.uk/~simond/pub/2010/Macrae-Dixon-ISMIR-2010-WindowedTimeWarping.pdf.
62. Li, J., and Wang, Y. EA DTW: Early Abandon to Accelerate Exactly Warping Matching of Time Series. Proceedings of the International Conference on Intelligent Systems and Knowledge Engineering 2007, Available online: https://www.atlantis-press.com/proceedings/iske2007/1421.10.2991/iske.2007.205 ↗
63. Silva, D.F., and Batista, G.E. (2016, January 5–7). Speeding up all-pairwise dynamic time warping matrix calculation. Proceedings of the 2016 SIAM International Conference on Data Mining, Miami, Florida, USA.10.1137/1.9781611974348.94 ↗
64. Cont, A., Schwarz, D., Schnell, N., and Raphael, C. (2007, January 23–27). Evaluation of real-time audio-to-score alignment. Proceedings of the International Symposium on Music Information Retrieval (ISMIR), Vienna, Austria.
65. Kuchaiev, O., Ginsburg, B., Gitman, I., Lavrukhin, V., Li, J., Nguyen, H., Case, C., and Micikevicius, P. (2018). Mixed-precision training for nlp and speech recognition with openseq2seq. arXiv.
66. Gao, X., Gupta, C., Li, H., and Lyrics Transcription and Lyrics-to-Audio Alignment with Music-Informed Acoustic Models (2023, January 31). MIREX. Available online: https://www.researchgate.net/profile/Gao-Xiaoxue/publication/345628181_LYRICS_TRANSCRIPTION_AND_LYRICS-TO-AUDIO_ALIGNMENT_WITH_MUSIC-INFORMED_ACOUSTIC_MODELS/links/5fa953cb92851cc286a08264/LYRICS-TRANSCRIPTION-AND-LYRICS-TO-AUDIO-ALIGNMENT-WITH-MUSIC-INFORMED-ACOUSTIC-MODELS.pdf.
67. Zhang, B., Wang, W., Zhao, E., Lui, S., and Lyrics-to-Audio Alignment for Dynamic Lyric Generation (2023, January 31). Music Inf. Available online: https://www.music-ir.org/mirex/abstracts/2020/ZWZL1.pdf.
68. Demirel, E., Ahlback, S., Dixon, S., and A recursive Search Method for Lyrics Alignment (2023, January 31). MIREX 2020 Audio-to-Lyrics Alignment and Lyrics Transcription Challenge. Available online: https://www.music-ir.org/mirex/abstracts/2020/DDA3.pdf.