
<!-- 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. -->

# Whisper_Cleverlytics

This model is a fine-tuned version of [openai/whisper-large-v3](https://huggingface.co/openai/whisper-large-v3) on the Voice_Cleverlytics dataset.

## Model description

Developed by: Cleverlytics team

## Usage
To run the model, first install the Transformers library through the GitHub repo. 

```python
pip install --upgrade pip
pip install --upgrade git+https://github.com/huggingface/transformers.git accelerate datasets[audio]
```

```python
import torch
from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline
#from datasets import load_dataset

device = "cuda:0" if torch.cuda.is_available() else "cpu"
torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
model_id = "smerchi/Voice_Cleverlytics_test3"

model = AutoModelForSpeechSeq2Seq.from_pretrained(
    model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=False, use_safetensors=True
)
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,
)

audio="/content/audio.mp3"

%time result = pipe(audio)
print(result["text"],)
```

## Intended uses & limitations

More information needed

## Training and evaluation data

More information needed

## Training procedure

### Training hyperparameters

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

### Training results



### Framework versions

- Transformers 4.36.2
- Pytorch 2.0.1+cu117
- Datasets 2.16.0
- Tokenizers 0.15.0

{"language": ["ar"], "license": "apache-2.0", "tags": ["hf-asr-leaderboard", "generated_from_trainer"], "datasets": ["Voice_Cleverlytics"], "base_model": "openai/whisper-large-v3", "model-index": [{"name": "Whisper_Cleverlytics", "results": []}]}
transformers tensorboard safetensors whisper automatic-speech-recognition hf-asr-leaderboard generated_from_trainer ar dataset:Voice_Cleverlytics base_model:openai/whisper-large-v3 license:apache-2.0 endpoints_compatible region:us