2.1. QazAVSR Dataset
The study utilizes QazAVSR, an audio–visual dataset created specifically for the Kazakh language. In terms of volumetric metrics, the finalized corpus consists of approximately 57 h of combined audio–visual recordings, comprising exactly 38,452 distinct, segmented utterances collected from 271 unique speakers. Utterances range from 3 to 15 words, with an average duration of 5.4 s, capturing both scripted vlogs and spontaneous colloquial speech. Linguistically, the foundational character vocabulary comprises 40 distinct tokens, whereas the overarching unique word vocabulary spans approximately 42,000 words, highlighting the massive lexical variety induced by Kazakh agglutinative morphology.
To prevent the model from overfitting to specific speaker traits or narrow topical domains, the dataset is diversified by gender, age, and topic. The speaker distribution is 48% male (130 speakers) and 52% female (141 speakers), with the primary age cohorts (20–35 and 36–50 years old) accounting for 74% of all subjects, providing comprehensive coverage of adult articulatory patterns (
Table 2). To establish a rigorous, speaker-independent evaluation protocol, the corpus was strictly partitioned using an 80/10/10 split ratio. Specifically, the training subset accounts for 80% of the dataset, encompassing approximately 46 h of recordings across 214 unique speakers. The validation split comprises 10% of the corpus, containing roughly 5.5 h of data from 28 speakers, while the testing split incorporates the remaining 10%, consisting of approximately 5.5 h of recordings from 29 distinct speakers.
To ensure high natural variability and real-world applicability, the majority of the dataset was collected from open-source social media platforms, encompassing acoustic environments from quiet indoor settings to noisy outdoor “in-the-wild” conditions. Video sequences, captured via diverse devices ranging from smartphones to professional cameras, were uniformly processed to a standard framerate of 25 frames per second (fps), while extracted audio was downsampled to 16 kHz. Data curation involved automated downloading, manual screening to guarantee clear frontal facial visibility, and precise alignment validation. Crucially, the synchronization error tolerance was strictly capped at a maximum of 40 milliseconds (roughly equivalent to a single video frame at 25 fps). Any source file demonstrating an audio–visual offset exceeding this 40 ms threshold during the experiment was disregarded.
As shown in
Figure 1, the thematic composition of the corpus is also diverse. Daily news, literature, politics, economy, religion, and traditions are dominant, but medicine, construction, education, science, and law are also represented. This broadens the model’s lexical coverage and improves its cross-domain stability.
Ethical Aspects: Given the use of facial video data sourced from public platforms (YouTube and TikTok), the dataset was curated in strict adherence to fair-use guidelines for academic research. While the original videos were publicly accessible, privacy and anonymization protocols were rigorously implemented: all metadata, original usernames, URLs, and channel identifiers were stripped from the dataset to protect speakers’ identities. The data processing pipeline received ethical approval from the local Institutional Review Board. Due to privacy constraints and platform terms of service, data sharing is restricted; the facial video subset will be shared only with verified academic researchers upon request, subject to a strict non-disclosure agreement.
2.4. Proposed AVSR Architecture
The proposed AVSR architecture is designed to capture and fuse complementary audio–visual information effectively. It consists of three primary stages: modality-specific encoders, a hierarchical cross-modal fusion module (BiModalHformer), and a joint decoding mechanism (
Figure 2).
Modality-Specific Encoders: The system processes two synchronized inputs: an audio waveform (X
a) and a sequence of video frames (X
v) focusing on the lip region. For the acoustic stream, the architecture employs the pretrained HuBERT_BASE model. HuBERT (Hidden-Unit BERT) has been decisively demonstrated to produce highly robust, noise-resilient speech representations. It achieves this by learning through a self-supervised masked prediction objective, forcing the model to infer missing acoustic tokens by analyzing the continuous, unmasked surrounding audio context. In this architecture, the lower layers of HuBERT are frozen to retain universal acoustic feature extraction capabilities, while the upper layers are fine-tuned to map specifically to Kazakh phonotactics [
24]. Concurrently, the visual stream processes the lip-region frame sequences using a Vision Transformer (ViT-B/16), pretrained on ImageNet, to extract spatial–visual dynamics [
25]. An ImageNet-pretrained ViT-B/16 model was explicitly chosen for this branch instead of a dedicated, speech-specific visual frontend (such as a 3D-ResNet trained on massive datasets like Lipreading In The Wild). This architectural decision was driven by fundamental data constraints: pretraining a dedicated visual frontend from scratch requires thousands of hours of high-quality, synchronized video data, which currently does not exist for the Kazakh language. Furthermore, employing English-trained lip-reading models risks introducing subtle inductive biases toward English visemes. Consequently, the ViT-B/16 architecture provides highly generalizable, language-agnostic spatial feature extraction capabilities. To facilitate meaningful integration, the outputs from both modality-specific encoders are passed through linear projection layers, mapping their respective feature dimensions into a shared latent space with a dimensionality of d
model = 256:
where Xa is the input raw acoustic waveform of speech and Xv is the input visual sequence of frames corresponding to the lip region. Enca denotes the acoustic encoder function. Encv denotes the visual encoder function. H
a and H
v represent the projected initial hidden feature representations.
BiModalHformer Fusion Module. The aligned features are fed into a three-layer Unified BiModalHformer fusion module. The key idea of this architecture is to organize information exchange between modalities not just at a single level, but across several hierarchical levels. The lower level captures articulatory details, the middle level models temporal-shape structure, and the upper level preserves semantic and contextual information.
At each layer, the architecture executes three distinct operations: (1) intra-layer attention, which models temporal dependencies within each modality independently; (2) inter-layer history passing, which maintains contextual memory from earlier processing stages; and (3) cross-modal attention, where audio queries visual features, and vice versa (
Figure 3).
Unlike simple late-fusion approaches or existing architectures like MLCA-AVSR, our BiModalHformer fundamentally distinguishes itself by incorporating this inter-layer history passing mechanism. This ensures that contextual memory from previous processing stages is preserved and propagated through the hierarchy, which is particularly beneficial for managing the complex agglutinative morphology of the Kazakh language.
The standard attention mechanism is computed as follows:
where Q, K and V denote the Query, Key, and Value matrices, respectively. T represents the matrix transposition operator. dk is the scaling factor corresponding to the dimension of the keys.
The multi-head attention (MHA) mechanism combines multiple projected heads:
where headi is the output of the i-th individual attention head and the learnable parameter projection weights for the i-th head and h indicates the total number of attention heads. Concat denotes the tensor concatenation operation along the feature dimension. WO is the final linear output projection weight matrix.
To realize the inter-layer history passing, the features from the previous layer
l-1 are aggregated with historical memory. The accumulated history context is also represented. The history-passed representation is computed before cross-modal fusion:
where l denotes the current layer index in the hierarchical fusion hierarchy (l {1, 2, 3})
and
represents the aggregated audio and video historical context matrices, respectively, spanning from the initial layer 0 up to layer
l-1.
and
are the refined audio and video feature representations are updated with historical cross-layer dependencies
and
serve as queries from the immediate preceding layer.
Following history passing, bidirectional cross-modal attention is applied at the l-th hierarchical level to allow each modality to query the other’s refined features:
where
is the cross-modal feature space where audio queries visual dynamics.
is the cross-modal feature space where video queries acoustic features. After processing through L hierarchical levels, signs from different levels are combined and projected into a common hidden space:
where L is the maximum number of hierarchical layers (L = 3). P denotes the linear projection function used to compress concatenated multi-layer tensors.
and
represent the complete aggregated multi-level cross-modal representations.
The final fused representation is obtained by a weighted combination of these multi-level features, effectively bridging both articulatory and semantic domains:
where Wa and Wv are learnable modality scaling weight matrices. H
fusion is the synchronized joint multimodal representation matrix passed to the decoding backend.
This mutual exchange ensures that visual cues (such as lip-rounding and articulatory boundaries) can effectively compensate for ambiguities in the acoustic stream, producing a rich, synchronized multimodal representation [
26].
Joint CTC/Attention Decoding: To generate the final transcription (Y), the fused features are processed by a joint decoding mechanism:
During training, the Transformer decoder operates in an autoregressive manner, utilizing the ground-truth target transcription to learn contextual and linguistic dependencies [
27]. Simultaneously, the CTC branch provides an auxiliary objective that aligns the fused features with the target sequence. The errors from both components are combined in a Joint CTC/Attention Scoring block by optimizing the weighted objective function:
Here, Ljoint is the total hybrid loss, LCTC is the Connectionist Temporal Classification loss, Latt is the attention decoder loss, and λ controls the contribution of the two objectives. With λ = 0.3, training relies on 30% CTC and 70% attention.
This synergistic approach allows the model to benefit from both the robust monotonic alignment of CTC and the superior semantic modelling of the Attention-based decoder. Finally, a linear projection layer maps these hidden states to the vocabulary space, producing the character-level probabilities required for the final transcription. This approach significantly mitigates alignment issues and improves accuracy in complex linguistic environments, such as that of the agglutinative Kazakh language [
28].