CoolFace
Modelpublic

PogusTheWhisper/Pathumma-whisper-th-large-v3-natural-noise-finetuned

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
1likes
Model Card

Pathumma Whisper Large V3 (TH) — Natural Noise-Robust Finetuned (v4, LoRA)

Model Description

This model is a Thai Automatic Speech Recognition (ASR) system based on `nectec/Pathumma-whisper-th-large-v3`, enhanced with LoRA (Low-Rank Adaptation) fine-tuning to improve robustness in noisy environments.

It uses WhisperForConditionalGeneration with SpecAugment and gradient checkpointing to improve performance on real-world noisy and spontaneous Thai speech. Training was done on a custom dataset simulating voice messages, ambient sound, and conversational noise.


Dataset

  • —Name: `tingwry/asr-augmented`
  • —Description: Thai ASR dataset augmented with realistic background noise (e.g., voice messages, ambient environments) to simulate common recording conditions.

Quickstart

python
import torch
from transformers import pipeline

device = "cuda" if torch.cuda.is_available() else "cpu"
torch_dtype = torch.bfloat16 if torch.cuda.is_available() else torch.float32

lang = "th"
task = "transcribe"

pipe = pipeline(
    task="automatic-speech-recognition",
    model="PogusTheWhisper/Pathumma-whisper-th-large-v3-natural-noise-finetuned",
    device=device,
    torch_dtype=torch_dtype,
    chunk_length_s=30,
    return_timestamps=False
)

pipe.model.config.forced_decoder_ids = pipe.tokenizer.get_decoder_prompt_ids(language=lang, task=task)

audio_path = "<Your wav file>"
result = pipe(audio_path)

print("Full Transcription:\n", result["text"])

Model Architecture

  • —Base Model: nectec/Pathumma-whisper-th-large-v3
  • —Adapter Type: LoRA
  • —Target Modules: q_proj, k_proj, v_proj
  • —LoRA Config:
  • —r=8
  • —lora_alpha=32
  • —lora_dropout=0.1

SpecAugment

  • —mask_time_prob = 0.2
  • —mask_feature_prob = 0.2

Training Arguments

  • —Epochs: 8
  • —Learning Rate: 2e-5
  • —Scheduler: Cosine
  • —Warmup Ratio: 0.05
  • —Batch Size: 4 (per device)
  • —Precision: bf16
  • —Optimizer: AdamW (fused)
  • —Gradient Checkpointing: Enabled
  • —Metric: CER
  • —Generation Max Length: 256
  • —Generation Beams: 5

Training Results

EpochTraining LossValidation LossCERWER
10.0493000.0224280.0525110.124607
20.0175000.0152230.0514520.100236
30.0129000.0122170.0494190.092767
40.0099000.0105610.0490240.091588
50.0075000.0101730.0488680.087657
60.0072000.0096470.0509300.086478
70.0067000.0095320.0515650.087264
80.0064000.0094920.0475980.086478

Evaluation Performance (in Percentage)

CER

modelsamplesSEACrowd/gowajeeSEACrowd/thai_elderly_speechfsicoli/common_voice_18_0google/fleurstingwry/asr-augmented
whisper-large-v338837.825.249.2510.954.58
pathumma-whisper-th-large-v3-natural-noise-finetuned3882.180.844.737.211.3
airesearch-wav2vec2-large-xlsr-53-th38830.313.836.4912.848.19
pathumma-whisper-th-large-v33881.270.54.757.394.57
monsoon-whisper-medium-gigaspeech238830.313.836.4912.848.19
thonburian-whisper-th-large-v3-combined3888.610.815.87.452.71

WER

modelsamplesSEACrowd/gowajeeSEACrowd/thai_elderly_speechfsicoli/common_voice_18_0google/fleurstingwry/asr-augmented
whisper-large-v338894.196.9178.8487.9774.12
pathumma-whisper-th-large-v3-natural-noise-finetuned3888.2319.3369.169.397.15
airesearch-wav2vec2-large-xlsr-53-th38899.5838.9267.7999.63100
pathumma-whisper-th-large-v33884.375.4180.3471.1390.02
monsoon-whisper-medium-gigaspeech238899.5838.9267.7999.63100
thonburian-whisper-th-large-v3-combined38839.8411.08110.6766.3349.85

Limitations and Future Work

  • —Trained on Thai-only speech, not multilingual
  • —Evaluated using CER, WER ; Thai word segmentation metrics will be explored in future versions
  • —May not generalize well to regional dialects or highly degraded audio
  • —Future improvements may include domain adaptation (e.g., medical, legal) and dialect-specific tuning

Acknowledgements

  • —NECTEC for the original base model
  • —OpenAI for Whisper architecture
  • —SuperAI Engineer Program for mentors support
  • —ThaiSC (NSTDA Supercomputer Center) for GPU compute on LANTA cluster
  • —Special thanks to P'Tik, P'Joe, P'Sam, P'nut and P'Earth
  • —And The Scamper SS5 House

Built with `peft==0.15.2` and `transformers==4.x`