cahya / wav2vec2-base-turkish-artificial-cv

huggingface.co
Total runs: 60
24-hour runs: 0
7-day runs: -16
30-day runs: -54
Model's Last Updated: February 02 2022
automatic-speech-recognition

Introduction of wav2vec2-base-turkish-artificial-cv

Model Details of wav2vec2-base-turkish-artificial-cv

Wav2Vec2-Large-XLSR-Turkish

This is the model for Wav2Vec2-Base-Turkish-Artificial-CV, a fine-tuned cahya/wav2vec2-base-turkish-artificial model on Turkish Common Voice dataset .

When using this model, make sure that your speech input is sampled at 16kHz.

Usage

The model can be used directly (without a language model) as follows:

import torch
import torchaudio
from datasets import load_dataset
from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor

test_dataset = load_dataset("common_voice", "tr", split="test[:2%]")

processor = Wav2Vec2Processor.from_pretrained("cahya/wav2vec2-base-turkish-artificial-cv")
model = Wav2Vec2ForCTC.from_pretrained("cahya/wav2vec2-base-turkish-artificial-cv")


# Preprocessing the datasets.
# We need to read the aduio files as arrays
def speech_file_to_array_fn(batch):
  speech_array, sampling_rate = torchaudio.load(batch["path"])
  resampler = torchaudio.transforms.Resample(sampling_rate, 16_000)
  batch["speech"] = resampler(speech_array).squeeze().numpy()
  return batch

test_dataset = test_dataset.map(speech_file_to_array_fn)
inputs = processor(test_dataset[:2]["speech"], sampling_rate=16_000, return_tensors="pt", padding=True)

with torch.no_grad():
  logits = model(inputs.input_values, attention_mask=inputs.attention_mask).logits

predicted_ids = torch.argmax(logits, dim=-1)

print("Prediction:", processor.batch_decode(predicted_ids))
print("Reference:", test_dataset[:2]["sentence"])
Evaluation

The model can be evaluated as follows on the Turkish test data of Common Voice.

import torch
import torchaudio
from datasets import load_dataset, load_metric
from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor
import re

test_dataset = load_dataset("common_voice", "tr", split="test")
wer = load_metric("wer")

processor = Wav2Vec2Processor.from_pretrained("cahya/wav2vec2-base-turkish-artificial-cv")
model = Wav2Vec2ForCTC.from_pretrained("cahya/wav2vec2-base-turkish-artificial-cv") 
model.to("cuda")

chars_to_ignore_regex = '[\,\?\.\!\-\;\:\"\“\‘\”\'\`…\’»«]'

# Preprocessing the datasets.
# We need to read the aduio files as arrays
def speech_file_to_array_fn(batch):
  batch["sentence"] = re.sub(chars_to_ignore_regex, '', batch["sentence"]).lower()
  speech_array, sampling_rate = torchaudio.load(batch["path"])
  resampler = torchaudio.transforms.Resample(sampling_rate, 16_000)
  batch["speech"] = resampler(speech_array).squeeze().numpy()
  return batch

test_dataset = test_dataset.map(speech_file_to_array_fn)

# Preprocessing the datasets.
# We need to read the aduio files as arrays
def evaluate(batch):
  inputs = processor(batch["speech"], sampling_rate=16_000, return_tensors="pt", padding=True)

  with torch.no_grad():
    logits = model(inputs.input_values.to("cuda")).logits

  pred_ids = torch.argmax(logits, dim=-1)
  batch["pred_strings"] = processor.batch_decode(pred_ids)
  return batch

result = test_dataset.map(evaluate, batched=True, batch_size=8)

print("WER: {:2f}".format(100 * wer.compute(predictions=result["pred_strings"], references=result["sentence"])))

Test Result : 13.70 %

Training

The Common Voice train , validation , other and invalidated

The script used for training can be found here

Runs of cahya wav2vec2-base-turkish-artificial-cv on huggingface.co

60
Total runs
0
24-hour runs
-5
3-day runs
-16
7-day runs
-54
30-day runs

More Information About wav2vec2-base-turkish-artificial-cv huggingface.co Model

More wav2vec2-base-turkish-artificial-cv license Visit here:

https://choosealicense.com/licenses/apache-2.0

wav2vec2-base-turkish-artificial-cv huggingface.co

wav2vec2-base-turkish-artificial-cv huggingface.co is an AI model on huggingface.co that provides wav2vec2-base-turkish-artificial-cv's model effect (), which can be used instantly with this cahya wav2vec2-base-turkish-artificial-cv model. huggingface.co supports a free trial of the wav2vec2-base-turkish-artificial-cv model, and also provides paid use of the wav2vec2-base-turkish-artificial-cv. Support call wav2vec2-base-turkish-artificial-cv model through api, including Node.js, Python, http.

wav2vec2-base-turkish-artificial-cv huggingface.co Url

https://huggingface.co/cahya/wav2vec2-base-turkish-artificial-cv

cahya wav2vec2-base-turkish-artificial-cv online free

wav2vec2-base-turkish-artificial-cv huggingface.co is an online trial and call api platform, which integrates wav2vec2-base-turkish-artificial-cv's modeling effects, including api services, and provides a free online trial of wav2vec2-base-turkish-artificial-cv, you can try wav2vec2-base-turkish-artificial-cv online for free by clicking the link below.

cahya wav2vec2-base-turkish-artificial-cv online free url in huggingface.co:

https://huggingface.co/cahya/wav2vec2-base-turkish-artificial-cv

wav2vec2-base-turkish-artificial-cv install

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

wav2vec2-base-turkish-artificial-cv install url in huggingface.co:

https://huggingface.co/cahya/wav2vec2-base-turkish-artificial-cv

Url of wav2vec2-base-turkish-artificial-cv

wav2vec2-base-turkish-artificial-cv huggingface.co Url

Provider of wav2vec2-base-turkish-artificial-cv huggingface.co

cahya
ORGANIZATIONS

Other API from cahya

huggingface.co

Total runs: 73
Run Growth: 54
Growth Rate: 73.97%
Updated:March 24 2022
huggingface.co

Total runs: 73
Run Growth: -66
Growth Rate: -90.41%
Updated:March 01 2025
huggingface.co

Total runs: 27
Run Growth: 19
Growth Rate: 70.37%
Updated:February 01 2022
huggingface.co

Total runs: 20
Run Growth: 6
Growth Rate: 30.00%
Updated:February 19 2023
huggingface.co

Total runs: 17
Run Growth: 11
Growth Rate: 64.71%
Updated:June 24 2024
huggingface.co

Total runs: 12
Run Growth: -24
Growth Rate: -200.00%
Updated:November 24 2022
huggingface.co

Total runs: 11
Run Growth: -129
Growth Rate: -1172.73%
Updated:April 17 2025
huggingface.co

Total runs: 11
Run Growth: 1
Growth Rate: 9.09%
Updated:February 01 2023
huggingface.co

Total runs: 7
Run Growth: 2
Growth Rate: 28.57%
Updated:July 06 2021
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:February 04 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:May 21 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:March 12 2023
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:February 04 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:February 11 2025