antony66 / whisper-large-v3-russian

huggingface.co
Total runs: 2.6K
24-hour runs: -58
7-day runs: -35
30-day runs: -4.9K
Model's Last Updated: July 03 2024
automatic-speech-recognition

Introduction of whisper-large-v3-russian

Model Details of whisper-large-v3-russian

Model Details

This is a version of openai/whisper-large-v3 finetuned for better support of Russian language.

Dataset used for finetuning is Common Voice 17.0, Russian part, that contains over 200k rows.

After preprocessing of the original dataset (all splits were mixed and splited to a new train + test split by 0.95/0.05, that is 225761/11883 rows respectively) the original Whisper v3 has WER 9.84 while the finetuned version shows 6.39 (so far).

The finetuning process took over 60 hours on dual Tesla A100 80Gb.

Usage

In order to process phone calls it is highly recommended that you preprocess your records and adjust volume before performing ASR. For example, like this:

sox record.wav -r 16k record-normalized.wav norm -0.5 compand 0.3,1 -90,-90,-70,-70,-60,-20,0,0 -5 0 0.2

Then your ASR code should look somewhat like this:

import torch
from transformers import WhisperForConditionalGeneration, WhisperProcessor, pipeline

torch_dtype = torch.bfloat16 # set your preferred type here 

device = 'cpu'
if torch.cuda.is_available():
    device = 'cuda'
elif torch.backends.mps.is_available():
    device = 'mps'
    setattr(torch.distributed, "is_initialized", lambda : False) # monkey patching
device = torch.device(device)

whisper = WhisperForConditionalGeneration.from_pretrained(
    "antony66/whisper-large-v3-russian", torch_dtype=torch_dtype, low_cpu_mem_usage=True, use_safetensors=True,
    # add attn_implementation="flash_attention_2" if your GPU supports it
)

processor = WhisperProcessor.from_pretrained("antony66/whisper-large-v3-russian")

asr_pipeline = pipeline(
    "automatic-speech-recognition",
    model=whisper,
    tokenizer=processor.tokenizer,
    feature_extractor=processor.feature_extractor,
    max_new_tokens=256,
    chunk_length_s=30,
    batch_size=16,
    return_timestamps=True,
    torch_dtype=torch_dtype,
    device=device,
)

# read your wav file into variable wav. For example:
from io import BufferIO
wav = BytesIO()
with open('record-normalized.wav', 'rb') as f:
    wav.write(f.read())
wav.seek(0)

# get the transcription
asr = asr_pipeline(wav, generate_kwargs={"language": "russian", "max_new_tokens": 256}, return_timestamps=False)

print(asr['text'])
Work in progress

This model is in WIP state for now. The goal is to finetune it for speech recognition of phone calls as much as possible. If you want to contribute and you know or have any good dataset please let me know. Your help will be much appreciated.

Runs of antony66 whisper-large-v3-russian on huggingface.co

2.6K
Total runs
-58
24-hour runs
-142
3-day runs
-35
7-day runs
-4.9K
30-day runs

More Information About whisper-large-v3-russian huggingface.co Model

whisper-large-v3-russian huggingface.co

whisper-large-v3-russian huggingface.co is an AI model on huggingface.co that provides whisper-large-v3-russian's model effect (), which can be used instantly with this antony66 whisper-large-v3-russian model. huggingface.co supports a free trial of the whisper-large-v3-russian model, and also provides paid use of the whisper-large-v3-russian. Support call whisper-large-v3-russian model through api, including Node.js, Python, http.

whisper-large-v3-russian huggingface.co Url

https://huggingface.co/antony66/whisper-large-v3-russian

antony66 whisper-large-v3-russian online free

whisper-large-v3-russian huggingface.co is an online trial and call api platform, which integrates whisper-large-v3-russian's modeling effects, including api services, and provides a free online trial of whisper-large-v3-russian, you can try whisper-large-v3-russian online for free by clicking the link below.

antony66 whisper-large-v3-russian online free url in huggingface.co:

https://huggingface.co/antony66/whisper-large-v3-russian

whisper-large-v3-russian install

whisper-large-v3-russian is an open source model from GitHub that offers a free installation service, and any user can find whisper-large-v3-russian on GitHub to install. At the same time, huggingface.co provides the effect of whisper-large-v3-russian install, users can directly use whisper-large-v3-russian installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

whisper-large-v3-russian install url in huggingface.co:

https://huggingface.co/antony66/whisper-large-v3-russian

Url of whisper-large-v3-russian

whisper-large-v3-russian huggingface.co Url

Provider of whisper-large-v3-russian huggingface.co

antony66
ORGANIZATIONS