File size: 1,203 Bytes
a620258
4bd6ad6
 
 
 
 
 
 
a8aa0ce
 
a620258
a8aa0ce
 
 
 
 
b1638bc
a8aa0ce
 
 
 
 
 
 
 
 
 
 
 
 
 
dca507e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d19dfe8
dca507e
a8aa0ce
 
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
---
license: apache-2.0
language:
- en
- gu
pipeline_tag: automatic-speech-recognition
---
---
language:
- gu
license: apache-2.0
tags:
- whisper-event
metrics:
- wer
model-index:
- name: LLM_GUJARATI - Manan Raval
  results:
  - task:
      type: automatic-speech-recognition
      name: Automatic Speech Recognition
    dataset:
      name: google/fleurs
      type: google/fleurs
      config: gu_in
      split: test
    metrics:
    - type: wer
      value: 12.33
      name: WER


## Usage

  In order to infer a single audio file using this model, the following code snippet can be used:

```python
>>> import torch
>>> from transformers import pipeline

>>> # path to the audio file to be transcribed
>>> audio = "/path/to/audio.format"
>>> device = "cuda:0" if torch.cuda.is_available() else "cpu"

>>> transcribe = pipeline(task="automatic-speech-recognition", model="mananvh/LLM_GUJARATI", chunk_length_s=30, device=device)
>>> transcribe.model.config.forced_decoder_ids = transcribe.tokenizer.get_decoder_prompt_ids(language="gu", task="transcribe")

>>> print('Transcription: ', transcribe(audio)["text"])
```

## Acknowledgement
This work was done at [Virtual Height IT Services Pvt. Ltd.]