Model reference · open weights
wav2vec2-korean is an open-weight audio or speech model from Kkonjeong. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Released by | Kkonjeong |
|---|---|
| Type | Audio & music |
| Task | Speech→text |
| Parameters (lead) | 94M |
| Runs with | transformers |
| Released | 2024-05-30 |
| Popularity | 3k downloads / month |
| Licence | Unknown |
About
This model is a fine-tuned version of Facebook's wav2vec2-base model, adapted for Korean language recognition using the Zeroth-Korean dataset. The model has been trained to transcribe Korean speech into text, specifically utilizing the unique jamo characters of the Korean language.
The model can be directly used for transcribing Korean speech to text without additional fine-tuning. It is particularly useful for applications requiring accurate Korean language recognition such as voice assistants, transcription services, and language learning tools.
This model can be integrated into larger systems that require speech recognition capabilities, such as automated customer service, voice-controlled applications, and more.
This model is not suitable for recognizing languages other than Korean or for tasks that require understanding context beyond the transcription of spoken Korean.
Users should be aware of the limitations of the model, including potential biases in the training data which may affect the accuracy for certain dialects or speakers. It is recommended to evaluate the model's performance on a representative sample of the intended application domain.
To get started with the model, use the code below:
!pip install transformers[torch] accelerate -U
!pip install datasets torchaudio -U
!pip install jiwer jamo
!pip install tensorboard
import torch
from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor
import torchaudio
from jamo import h2j, j2hcj
model_name = "Kkonjeong/wav2vec2-base-korean"
model = Wav2Vec2ForCTC.from_pretrained(model_name)
processor = Wav2Vec2Processor.from_pretrained(model_name)
model.to("cuda")
model.eval()
def load_and_preprocess_audio(file_path):
speech_array, sampling_rate = torchaudio.load(file_path)
if sampling_rate != 16000:
resampler = torchaudio.transforms.Resample(sampling_rate, 16000)
speech_array = resampler(speech_array)
input_values = processor(speech_array.squeeze().numpy(), sampling_rate=16000).input_values[0]
return input_values
def predict(file_path):
input_values = load_and_preprocess_audio(file_path)
input_values = torch.tensor(input_values).unsqueeze(0).to("cuda")
with torch.no_grad():
logits = model(input_values).logits
predicted_ids = torch.argmax(logits, dim=-1)
transcription = processor.batch_decode(predicted_ids)[0]
return transcription
audio_file_path = "your_audio_file.wav"
transcription = predict(audio_file_path)
print("Transcription:", transcription)
The model was trained using the Zeroth-Korean dataset, a collection of Korean speech data. This dataset includes audio recordings and their corresponding transcriptions.
Special characters were removed from the transcriptions, and the text was converted to jamo characters to better align with the Korean language's phonetic structure.
The model was evaluated using the test split of the Zeroth-Korean dataset.
The primary evaluation metric used was the Character Error Rate (CER), which measures the percentage of characters that are incorrect in the transcription compared to the reference text.
The model achieved a CER of 7.3%, indicating good performance on the Zeroth-Korean dataset.
Carbon emissions can be estimated using the Machine Learning Impact calculator.
The model architecture is based on wav2vec2.0, designed to convert audio input into text output by modeling the phonetic structure of speech.
BibTeX:
@misc{your_bibtex_key,
author = {Your Name},
title = {wav2vec2-base-korean},
year = {2024},
publisher = {Hugging Face},
note = {https://huggingface.co/Kkonjeong/wav2vec2-base-korean}
}
APA:
Your Name. (2024). wav2vec2-base-korean. Hugging Face. https://huggingface.co/Kkonjeong/wav2vec2-base-korean
[jeonghyeon Park, Jaeyoung Kim]
For more information, contact [shshjhjh4455@gmail.com, kbs00717@gmail.com].
From the published model card. Full card on the HuggingFace links in the sidebar.
Using it via the API
Once AxForge deploys wav2vec2-korean for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (wav2vec2-korean below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/audio/transcriptions \ -H "Authorization: Bearer $AXFORGE_API_KEY" \ -F model="wav2vec2-korean" -F file=@audio.mp3
Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.