Manuscript Offprint
arXiv:2610.29031KunSet: A Corpus and Benchmark for Lyrics Alignment and Rhyme Retrieval in Kunqu Opera
ABSTRACT
Kunqu is one of the oldest extant forms of Chinese opera, yet its digitization remains scarce and difficult to annotate, with two challenges standing out: first, close analysis of Kunqu performance demands syllable-level lyrics alignment; second, analyzing Kunqu pronunciation requires its phonological attributes (e.g., rhyme) to be linked with each syllable. To address these challenges, we present KunSet, the first Kunqu performance corpus comprising 482,164 fine-grained annotations of syllable-level lyrics and phonological attributes in total media duration of 155.2 h with 106.3 h annotated. To ensure annotation quality, KunSet was preannotated by an iterative ML-assisted pipeline and corrected by over 200 trained annotators via a purpose-built online annotation system under a two-round review process. To assess KunSet as a music information retrieval (MIR) benchmark, we evaluate two tasks: lyrics alignment, by finetuning a forced-alignment model with an acoustic anchor decoder; and same-rhyme retrieval, using frozen Chinese HuBERT features. Models built with KunSet outperform their baselines. We release KunSet and model checkpoints to support MIR research on traditional-music corpora .
Index Terms— Kunqu Opera, Syllable-level Lyrics Alignment, Rhyme Retrieval, Music Information Retrieval.
1. INTRODUCTION
Honored as the “teacher of a hundred Chinese theatrical genres”, Kunqu was proclaimed a Masterpiece of the Oral and Intangible Heritage of Humanity by UNESCO in 2001 [1]. Over six centuries of development it accumulated a vast repertoire of plays and techniques transmitted almost entirely by oral instruction and imitation, many of which have already been lost [2]. Its digitization and close analysis are therefore urgent. A central unit for such analysis is the syllable: Kunqu melodies are set to follow the tones of the lyrics, and each syllable is articulated through its head, belly and tail [3]. Studying these practices across performances requires both syllable-level timing and phonological information.
One of the most important digitization efforts, Kunqu Opera Art Canon [4], preserves texts, scores and audiovisual records of 297 expert-selected performed excerpts. KunquDB [5] further provides sentence-level timestamps and speaker metadata, but lacks finer syllable boundaries. Another branch of Kunqu preservation focuses on its phonological system, which informs how syllables are sung and articulated [3]. Shen Chenglin's Yunxue Lizhu (韵学骊珠), compiled in 1792, provides a systematic Kunqu phonological taxonomy of Chinese characters [6, 7]. An existing digital interface supports source-page lookup [8], yet phonological attributes are not directly searchable. Nine Modes Manual Online [9] annotates tone and yin-yang for a historical Kunqu melody manual, but does not link them to performance recordings. Together, these resources leave two gaps: 1) syllable-level alignment of sung and spoken lyrics to performance recordings, and 2) phonological attributes linked to each syllable. Addressing these requires large-scale annotation and structured phonological digitization.
Recent developments in forced alignment provide a basis for obtaining syllable boundaries at scale. MFA [10] addresses speech alignment, while CTC-based methods [11] and SOFA [12] target singing voices. However, forced alignment models pretrained on speech or modern singing perform poorly on Kunqu, where sustained melismatic syllables and stylized pronunciation lie outside their training distribution.
In this work, we close both gaps with three contributions:
• We present KunSet, to our knowledge, the first syllable-aligned Kunqu performance corpus with linked phonological attributes, comprising 482,164 syllable-level timestamps over 106.3 h of sung and spoken lyrics in 281 recordings, supporting comparison between actual interpretation and traditional phonological knowledge.
• We design a curation pipeline: an iteratively fine-tuned SOFA model preannotates syllable boundaries, with corrections by over 200 trained annotators under two-round review in a purpose-built system, validated through two independent blind annotations and acoustic analyses; and a searchable digitization of Yunxue Lizhu that links syllables to candidate phonological attributes.
• We build two Kunqu-specific MIR systems and benchmark them on KunSet: a fine-tuned SOFA model with a proposed acoustic anchor decoder for syllable-level lyrics alignment, and a same-rhyme retrieval model trained with phonological supervision on frozen HuBERT features. Both outperform their baselines, demonstrating KunSet's value for Kunqu MIR research.
These authors contributed equally to this work.
Corresponding author.
https://github.com/Kunyuan-Project/KunSet

Fig. 1. Annotation pipeline for the syllable-aligned corpus.
2.1. Dataset Format and Label Ontology
KunSet is derived from 281 high-quality Kunqu excerpts in Kunqu Opera Art Canon. The label ontology of KunSet is illustrated in Fig. 2 as excerpt–sentence–syllable hierarchy. All labels are represented in JSON format:
-
Excerpt: the video recording of one performed Kunqu excerpt (zhe), with a , 25 fps video track and stereo audio at .
-
Lyric sentence: one sentence of sung lyrics or spoken dialog in the recording, with its start time, end time, the stage character(s) delivering it, its delivery mode (sung or spoken), and the transcript.
-
Syllable: the start time, end time, and corresponding phonological attributes of every Chinese character (one syllable each) within a sentence.
In Kunqu opera, each Chinese character (字) is one syllable and thus an unambiguous unit of lyrics alignment. We associate each lyric sentence with its constituent syllables through a unique lineId, preserving sentence-level text, delivery mode, and role information. Both sentence and syllable annotations are defined by onset and offset times on the recording timeline. Each syllable annotation additionally includes a phonology field linking it to candidate readings in Yunxue Lizhu. We retain all dictionary candidates and populate each attribute only when there is a single candidate or all candidates agree on a non-missing value; unresolved attributes remain unset.
Summarized in Table 1 and Fig. 3, the dataset consists of 281 recordings, with labeled singing and stage speech data. The annotated corpus is approximately balanced between singing (47.3%) and stage speech (51.9%), while individual recordings vary substantially in relative proportions. Sung sentences have a longer median duration than spoken sentences (8.81 s versus 2.77 s), consistent with the sustained vocalization characteristic of Kunqu singing. Of the 482,164 syllable annotations, 461,164 (95.6%) have dictionary candidates, and 273,996 (56.8%) have unambiguous values for all six phonological attributes.
2.2. Annotation and Review Pipeline
To overcome the cost and difficulty of manual lyrics alignment, we adopt a preannotation-and-review workflow: initial syllable-level timestamps are generated automatically through an ML-assisted pipeline, corrected by one annotator, and then passed through two rounds of review by different reviewers.
The preannotation pipeline is summarized in Fig. 1. We first used VideOCR [13] to extract initial sentence timestamps and transcripts from the recordings, and Mel-Band RoFormer [14] to separate vocals from accompaniment. We initialized the iterative process by manually annotating one Kunqu excerpt and fine-tuning SOFA's pretrained
Table 1. Descriptive statistics of the 281-recording KunSet corpus. Time coverage uses interval unions.
| Measure | Value |
|---|---|
| Recordings (the number of) | 281 |
| Media / lyrics-covered time (h) | 155.19 / 106.34 |
| Sung / spoken / mixed (h) | 50.30 / 55.15 / 0.90 |
| Sentence / syllable records | 78,505 / 482,164 |
| Distinct transcript characters | 4,357 |
| Sentence time coverage (known media) | 68.5% |
| Phonology-linked / resolved syllable records | 461,164 / 273,996 |

Fig. 2. Excerpt–sentence–syllable annotation hierarchy (selected fields). Sentence and syllable annotations are linked by lineId, with all times referring to the recording timeline. Each syllable links to dictionary candidates through phonology.
Mandarin singing checkpoint [12] on it. The adapted model then produced additional annotated excerpts, which were corrected and reviewed before being added to the fine-tuning set. Repeating this cycle expanded the training set from one to seven excerpts, and the resulting model generated initial timestamps for the remaining 274 recordings. This preannotation model is included in the alignment benchmark in Section 3.1.
An online annotation system is developed for over 200 trained annotators (demo available ). The system displays video, sentence transcripts, and editable syllable intervals on a shared, zoomable timeline. Optional waveform and spectrogram displays support acoustic inspection, as in established tools such as Praat [15]. Delivery mode (singing or stage speech) and role labels are annotated separately at the sentence level. Project assignments, file-level permissions, and completion states are used to coordinate annotation and review across the annotator pool. Reviewers confirm annotations, leave time-linked
https://tinyurl.com/kunset-icassp-demo
(a) Time coverage

(c) Sentence duration

(e) Phonology coverage

(b) Delivery-mode mix
(d) Syllable duration

(f) Attribute coverage
Fig. 3. Overview of 281 recordings. (a) Time by type; mixed denotes conflicting labels, outside denotes unannotated time. (b) Per-recording time composition, sorted by singing share. (c, d) Sentence and syllable duration CDFs (log-scaled). (e) All six attributes resolved, linked but not all resolved, or unlinked. (f) Attributes resolved by a single candidate or candidate consensus.
comments, correct boundaries when necessary, and flag unresolved cases for further review. After correction and review, the annotations are exported in the JSON format described in Section 2.1.
2.3. Searchable Phonological Database
To link every syllable with traditional phonological attributes, we structured Yunxue Lizhu into a searchable database that provides fanqie, tone, yin-yang, rhyme, wuyin, and voicing for each candidate entry. We commissioned Classical Chinese experts to transcribe the original print, and converted the transcription to JSONL and SQLite. Exact lookup returns all candidates, with recorded variants providing a fallback. The database contains 10,235 entries for 8,300 direct-lookup Chinese characters, including 1,664 characters with multiple entries and 2,520 variant-alias relations.
2.4. Annotation Quality Assessment
To assess annotation consistency and verify that the ML preannotation stage does not introduce bias, we compare the reviewed production annotations (M) on the 10 randomly selected test recordings with two independently produced blind annotations, A and B. For each blind annotation, a seeded monotonic time warp shifts sentence starts and ends by 1–3 seconds, using different seeds for A and B while preserving sentence order and shared boundaries and preventing adjacent-sentence overlap. Syllable intervals are then initialized by uniformly dividing each perturbed sentence in transcript order. The two versions are then independently corrected with two rounds of review.
Using A as the text reference, we identify 15,710 syllable instances shared across all three versions. We compute onset and offset MAE on these matched instances, with recordings weighted equally (Table 2). Overall, the M–A and M–B discrepancies are close to those between the two blind annotations, A–B, with MAEs differing by at most 18.14 ms. This suggests that the reviewed production annotations achieve temporal consistency comparable to independently produced blind annotations. Across all three pairs, disagreement is greater for singing than speech and for offsets than onsets, suggesting that these patterns reflect shared annotation difficulty rather than a discrepancy specific to ML-assisted production.
Table 2. Production (M) versus blind annotations (A/B), grouped by A's delivery labels. Onset and offset MAEs (ms) are recording-macro averages; lower is better.
| Pair | Overall ↓ | Sung ↓ | Spoken ↓ | |||
|---|---|---|---|---|---|---|
| Onset | Offset | Onset | Offset | Onset | Offset | |
| M-A | 158.8 | 206.4 | 272.1 | 354.1 | 115.8 | 156.7 |
| M-B | 172.5 | 225.5 | 309.1 | 408.5 | 126.2 | 165.0 |
| A-B | 158.1 | 207.3 | 282.8 | 384.0 | 108.2 | 147.8 |
(a) Onset strength

(b) RMS energy
Fig. 4. Acoustics around syllable starts and random times in the same sentence. Zero marks the sampled time; shading shows pointwise confidence intervals from 2,000 recording-level bootstrap resamples.
2.5. Acoustic Consistency Verification
We further evaluate annotation consistency by testing whether annotated syllable starts correspond to systematic acoustic changes. Across 281 recordings, we analyze syllable starts using source-separated vocals. Each start is compared with five other random times in the same sentence, at least 100 ms from any annotated start. We compute onset strength (positive log-mel spectral flux) and RMS energy with librosa [16], standardized within recordings and averaged with equal recording weights. Figure 4 shows that syllable starts exhibit sharp increases in onset strength and RMS energy from near-onset troughs, whereas random-time controls decline over the same interval. The 0–200 ms onset-strength contrast is 0.47 standard deviations (recording-level bootstrap 95% CI: 0.46–0.49), and remains 0.43 (0.42–0.45) after excluding sentence-initial syllables. This supports a corpus-level association between the annotated starts and acoustic transitions, including within sentences.
3. EXPERIMENTS
To demonstrate how KunSet supports MIR research on traditional-music corpora, we benchmark two tasks: syllable-level lyrics alignment, to assess its value for adapting alignment models to Kunqu, and same-rhyme retrieval, to examine the benefit of traditional phonological supervision.
3.1. Syllable-level lyrics alignment
Data and models. We evaluate syllable-level lyrics alignment on a recording-level split of 251 Train, 20 Dev and 10 Test recordings. The 10 Test recordings use blind annotation A as the reference. Models receive source-separated vocals by Mel-Band RoFormer [14] and the corresponding sentence transcripts. We compare pretrained
Table 3. Test alignment overall and by delivery mode. MAE (ms) and Acc@200 (%) are recording-macro averages. Ours (FT251): 3-seed means, overall MAE seed SDs ms; Ours (FT7): one model.
| Model | Overall | Sung | Spoken | ||||
|---|---|---|---|---|---|---|---|
| Decoder | MAE ↓ | Acc@200 ↑ | MAE ↓ | Acc@200 ↑ | MAE ↓ | Acc@200 ↑ | |
| Pretrained | Original | 391.30 | 61.93 | 797.83 | 48.78 | 288.63 | 64.72 |
| Pretrained | Anchor | 337.70 | 65.12 | 702.34 | 50.76 | 241.07 | 68.45 |
| Ours (FT7) | Original | 372.91 | 64.49 | 753.40 | 53.66 | 267.69 | 67.25 |
| Ours (FT7) | Anchor | 312.90 | 67.60 | 620.62 | 56.64 | 233.98 | 70.35 |
| Ours (FT251) | Original | 224.04 | 79.52 | 529.21 | 65.35 | 144.95 | 83.46 |
| Ours (FT251) | Anchor | 194.83 | 81.69 | 462.48 | 67.50 | 123.77 | 85.84 |
Mandarin-singing SOFA [12] with Kunqu-adapted SOFA fine-tuned on 7 excerpts (from the iterative preannotation stage) and 251 excerpts (full scale), each decoded using either the original decoder or the proposed acoustic anchor decoder.
Training settings For the 251-recording model, we fine-tune the acoustic backbone and prediction head for 9,000 steps with three seeds. We use AdamW optimizer with weight decay 0.1 and a one-cycle learning-rate schedule with peak rates of for the backbone and for the head. We use pretrained SOFA to supply within-syllable phone-boundary pseudo-labels, with a boundary-loss weight of 0.1 for training. For each seed and decoder, checkpoints are selected by recording-macro Dev boundary MAE.
Acoustic anchor decoding. Sustained syllables can have unclear edges but strong phone evidence within them. We design the decoder to select boundaries jointly with the strongest evidence frame in each candidate phone interval. Building on SOFA's phone-peak scoring [12], it maximizes:
Here assigns frames to ordered transcript positions with phone labels and intervals ; only silence (SP) may be skipped. is frame-level phone evidence, scores boundaries, and penalizes entering positions. The peak term, weighted by , rewards intervals containing strong evidence for the expected phone. An exact search jointly selects anchors and boundaries, after which phone intervals are grouped into syllables. The decoder changes inference without changing acoustic training.
Evaluation and results. We evaluate 11,735 internal syllable boundaries using MAE in milliseconds and Acc@200, the percentage within 200 ms, both averaged equally across recordings. Results for the 251-excerpt adapted models are averaged over three seeds. Table 3 shows complementary gains from corpus-scale adaptation and acoustic-anchor decoding. Fine-tuning on 251 excerpts substantially reduces MAE under both decoders, while acoustic anchors further reduce adapted-model MAE by 13.04% and increase Acc@200 from 79.52% to 81.69%. The 251-excerpt model also clearly outperforms the seven-excerpt preannotation model under both decoders, showing continued benefit from the expanded reviewed corpus.
Although Table 2 uses a different boundary set, the comparison provides useful context: on sung sentences the adapted model's error (462.48 ms) remains above human disagreement (272–409 ms), whereas on spoken sentences it is of the same magnitude (123.77 ms versus 108–165 ms). This suggests that the main remaining alignment difficulty lies in Kunqu singing instead of stage speech.
Table 4. Same-rhyme retrieval on the 10-recording Test pool: macro P@10 (%), mean ± sample SD over three seeds.
| Supervision | P@10 ↑ |
|---|---|
| None (HuBERT) | 11.36 |
| Shuffled rhyme groups | 8.81 ± 0.07 |
| Modern Mandarin finals | 16.35 ± 0.14 |
| Traditional rhyme groups (ours) | 17.16 ± 0.11 |
3.2. Same-rhyme retrieval
Data and models. Using the same 251/20/10 recording split and known-mode (singing/spoken) sentence selection as alignment, we retain instances with unambiguous traditional rhyme and modern Mandarin-final labels: 256,333 Train and 20,674 Dev instances, and 10,287 Test instances. All 29 rhyme groups have supported Test queries. A frozen Chinese HuBERT-base encoder [17, 18] processes each clip at . The mean and standard deviation of its final-layer frame representations form a 1,536-dimensional feature, standardized using Train statistics. A projection head maps dimensions with ReLU, dropout 0.1 and output normalization. We compare traditional rhyme labels, modern Mandarin finals and traditional labels shuffled within each training recording; frozen HuBERT features without a projection head serve as the baseline.
Training settings. We train the projection head on each learned condition using supervised contrastive loss [19] with temperature 0.1 and uniformly weighted positive pairs from different Chinese characters and recordings. Batches sample up to eight classes and 16 instances per class. We use AdamW with learning rate and weight decay . All conditions train for 200 epochs of 400 steps with three seeds. We use Dev P@10 to select checkpoints before Test evaluation.
Evaluation and results. Queries search the Train library by cosine similarity, excluding candidates with the same Chinese character identity or recording as the query. The primary metric, P@10, is the fraction of same-rhyme instances among the ten nearest neighbors, averaged equally across rhyme groups. Table 4 reports Test means and standard deviations over three seeds on the common query set.
Traditional supervision achieves the highest P@10 at 17.16%, exceeding modern Mandarin finals by 0.81 percentage points (95% paired recording-bootstrap interval: [0.47, 1.18]) and frozen HuBERT by 5.80 percentage points; shuffled supervision performs substantially worse. The small performance gap between traditional rhyme supervision and modern Mandarin finals is consistent with substantial overlap in the phonological information captured by the two systems, while the larger gain over frozen features shows the benefit of phonological supervision for organizing performance audio by rhyme. Because retrieval is evaluated using traditional rhyme labels, the traditional–modern difference should be interpreted in light of this taxonomy match.
4. CONCLUSION
We presented KunSet, a Kunqu corpus comprising 281 recordings with 482,164 syllable-level annotations and links to phonological attributes from Yunxue Lizhu. Experiments demonstrate improved lyrics alignment and the benefit of traditional phonological supervision for same-rhyme retrieval. The dataset, code, and model weights are released for research-purpose only, providing a foundation for MIR research on Kunqu.
5. ACKNOWLEDGEMENTS
This study is funded by the School of Arts, Peking University, as part of the Kunyuan project.
6. REFERENCES
[1] UNESCO, “Kun Qu Opera,” Representative List of the Intangible Cultural Heritage of Humanity, https://ich.unesco.org/en/RL/kun-qu-opera-00004. Accessed: Sep. 13, 2026.
[2] UNESCO, “Safeguarding, revitalization and promotion of the Kunqu opera,” Intangible Cultural Heritage safeguarding project, 2002, https://ich.unesco.org/en/projects/safeguarding-revitalization-and-promotion-of-the-kunqu-opera-00096. Accessed: Sep. 13, 2026.
[3] Chongsui Shen, “Duqu Xuzhi,” Chinese Classical Drama Database, digital transcription, Chapters Shouyin Wenda and Sisheng Piku’an. In Chinese. Accessed: Sep. 13, 2026.
[4] Wenzhang Wang, Ed., Kunqu Yishu Dadian [Kunqu Opera Art Canon], Anhui Literature and Art Publishing House, 2016, In Chinese.
[5] Huali Zhou, Yuke Lin, Dong Liu, and Ming Li, “KunquDB: An attempt for speaker verification in the Chinese opera scenario,” in Proc. ICPR, Part XXIII. 2024, vol. 15323 of Lecture Notes in Computer Science, pp. 233–249, Springer.
[6] Chenglin Shen, Yunxue Lizhu, Zhenliu Ju, 1796, Qing-dynasty edition, two juan. In Chinese.
[7] Rujie Shi, “Phonological system and syllabary of Quyun Lizhu,” Studies in Foreign Affairs, vol. 42, no. 1, pp. 25–53, 2014, In Chinese.
[8] Gongchepu.net, “Yunxue Lizhu WeChat mini-program,” https://gongchepu.net/projects/, Accessed: Sep. 13, 2026.
[9] Casey Schoenberger, “Introduction: Creative cycles of the extended mind,” in Music, Mind, and Language in Chinese Poetry and Performance: The Voice Extended, pp. 1–33. Oxford University Press, 2024.
[10] Michael McAuliffe, Michaela Socolof, Sarah Mihuc, Michael Wagner, and Morgan Sonderegger, “Montreal Forced Aligner: Trainable text-speech alignment using Kaldi,” in Proc. Interspeech. 2017, pp. 498–502, ISCA.
[11] Andrea Vaglio, Romain Hennequin, Manuel Moussallam, Gaël Richard, and Florence d'Alché-Buc, "Multilingual lyrics-to-audio alignment," in Proc. ISMIR, 2020, pp. 512–519.
[12] qiuqiao and SOFA contributors, “SOFA: Singing-oriented forced aligner,” https://github.com/qiuqiao/SOFA, Accessed: Sep. 13, 2026.
[13] timminator and VideOCR contributors, “VideOCR: Extract hardcoded subtitles from videos,” https://github.com/timminator/VideOCR, Accessed: Sep. 13, 2026.
[14] Ju-Chiang Wang, Wei-Tsung Lu, and Minz Won, “Mel-Band RoFormer for music source separation,” CoRR, vol. abs/2310.01809, 2023.
[15] Paul Boersma, “Praat, a system for doing phonetics by computer,” Glot International, vol. 5, no. 9/10, pp. 341–345, 2001.
[16] Brian McFee, Colin Raffel, Dawen Liang, Daniel P. W. Ellis, Matt McVicar, Eric Battenberg, and Oriol Nieto, “librosa: Audio and music signal analysis in Python,” in Proc. Python in Science Conference (SciPy). 2015, pp. 18–25, scipy.org.
[17] Wei-Ning Hsu, Benjamin Bolte, Yao-Hung Hubert Tsai, Kushal Lakhotia, Ruslan Salakhutdinov, and Abdelrahman Mohamed, "HuBERT: Self-supervised speech representation learning by masked prediction of hidden units," IEEE/ACM Trans. Audio Speech Lang. Process., vol. 29, pp. 3451–3460, 2021.
[18] Pengcheng Guo and Shixing Liu, “chinese_speech_pretrain,” https://github.com/TencentGameMate/chinese_speech_pretrain, 2022, Chinese HubERT Base checkpoint: https://huggingface.co/TencentGameMate/chinese-hubert-base. Accessed: Sep. 13, 2026.
[19] Prannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna, Yonglong Tian, Phillip Isola, Aaron Maschinot, Ce Liu, and Dilip Krishnan, “Supervised contrastive learning,” in Advances in Neural Information Processing Systems, 2020, vol. 33, pp. 18661–18673.