File size: 2,732 Bytes
7bf2e0e
 
 
 
 
 
 
 
 
 
89af8f2
bcfe9f7
7bf2e0e
 
 
 
 
9a9580c
7bf2e0e
 
 
bcfe9f7
 
 
 
 
 
 
7bf2e0e
 
 
9a9580c
7bf2e0e
 
 
9a9580c
7bf2e0e
 
 
9a9580c
7bf2e0e
5943fbd
c67eccb
 
5943fbd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
eec2a9d
7bf2e0e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
---
language:
- tel
license: apache-2.0
base_model: openai/whisper-large-v3
tags:
- generated_from_trainer
datasets:
- jayasuryajsk/google-fleurs-te-romanized
model-index:
- name: Wishper-Large-V3-spoken_telugu_romanized
  results: []
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# Wishper Large V3 - Romanized Spoken Telugu

This model is a fine-tuned version of [openai/whisper-large-v3](https://huggingface.co/openai/whisper-large-v3) on the Telugu Romanized 1.0 dataset.
It achieves the following results on the evaluation set:
- eval_loss: 1.5009
- eval_wer: 68.1275
- eval_runtime: 591.6137
- eval_samples_per_second: 0.798
- eval_steps_per_second: 0.1
- epoch: 8.6207
- step: 1000

## Model description

The model is trained to transcipt Telugu conversations in Romanized script, that most people uses in day to day life.

## Intended uses & limitations

Limitations: Sometimes, it translates the audio to english directly. Working on this to fix it.

## Training and evaluation data

Gpt 4 api was used to convert ``` google-fleurs ``` telugu labels to romanized script. I used english tokenizer, since the script is in english alphabet to train the model.

## Usage

```python
from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline
import torch

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

model_id = "jayasuryajsk/whisper-large-v3-Telugu-Romanized"

model = AutoModelForSpeechSeq2Seq.from_pretrained(
    model_id, torch_dtype=torch_dtype
)
model.to(device)

processor = AutoProcessor.from_pretrained(model_id)

pipe = pipeline(
    "automatic-speech-recognition",
    model=model,
    tokenizer=processor.tokenizer,
    feature_extractor=processor.feature_extractor,
    max_new_tokens=128,
    chunk_length_s=30,
    batch_size=16,
    return_timestamps=True,
    torch_dtype=torch_dtype,
    device=device,
)
result = pipe("recording.mp3", generate_kwargs={"language": "english"})
print(result["text"])
```
Try this on https://colab.research.google.com/drive/1KxWSaxZThv8PE4mDoLfJv0O7L-5hQ1lE?usp=sharing 

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 1e-05
- train_batch_size: 20
- eval_batch_size: 8
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 500
- training_steps: 2000
- mixed_precision_training: Native AMP

### Framework versions

- Transformers 4.40.1
- Pytorch 2.2.0+cu121
- Datasets 2.19.1
- Tokenizers 0.19.1