Whisper-Large v3 for Regional Languages Classification in India
Model Description
This model includes the implementation of regional languages classification in India described in
Voxlect: A Speech Foundation Model Benchmark for Modeling Dialect and Regional Languages Across the Globe
# Load librariesimport torch
import torch.nn.functional as F
from src.model.dialect.whisper_dialect import WhisperWrapper
# Find device
device = torch.device("cuda") if torch.cuda.is_available() else"cpu"# Load model from Huggingface
model = WhisperWrapper.from_pretrained("tiantiaf/voxlect-indic-whisper-large-v3").to(device)
model.eval()
Prediction
# Label List
label_list = [
"assamese",
"bengali",
"bodo",
"dogri",
"english",
"gujarati",
"hindi",
"kannada",
"kashmiri",
"konkani",
"maithili",
"malayalam",
"manipuri",
"marathi",
"nepali",
"odia",
"punjabi",
"sanskrit",
"santali",
"sindhi",
"tamil",
"telugu",
"urdu"
]
# Load data, here just zeros as an example# Our training data filters output audio shorter than 3 seconds (unreliable predictions) and longer than 15 seconds (computation limitation)# So you need to prepare your audio to a maximum of 15 seconds, 16kHz, and mono channel
max_audio_length = 15 * 16000
data = torch.zeros([1, 16000]).float().to(device)[:, :max_audio_length]
logits, embeddings = model(data, return_feature=True)
# Probability and output
dialect_prob = F.softmax(logits, dim=1)
print(dialect_list[torch.argmax(dialect_prob).detach().cpu().item()])
Responsible Use: Users should respect the privacy and consent of the data subjects, and adhere to the relevant laws and regulations in their jurisdictions when using Voxlect.
If you have any questions, please contact: Tiantian Feng (
[email protected]
)
Runs of tiantiaf voxlect-indic-whisper-large-v3 on huggingface.co
0
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs
More Information About voxlect-indic-whisper-large-v3 huggingface.co Model
More voxlect-indic-whisper-large-v3 license Visit here:
voxlect-indic-whisper-large-v3 huggingface.co is an AI model on huggingface.co that provides voxlect-indic-whisper-large-v3's model effect (), which can be used instantly with this tiantiaf voxlect-indic-whisper-large-v3 model. huggingface.co supports a free trial of the voxlect-indic-whisper-large-v3 model, and also provides paid use of the voxlect-indic-whisper-large-v3. Support call voxlect-indic-whisper-large-v3 model through api, including Node.js, Python, http.
voxlect-indic-whisper-large-v3 huggingface.co is an online trial and call api platform, which integrates voxlect-indic-whisper-large-v3's modeling effects, including api services, and provides a free online trial of voxlect-indic-whisper-large-v3, you can try voxlect-indic-whisper-large-v3 online for free by clicking the link below.
tiantiaf voxlect-indic-whisper-large-v3 online free url in huggingface.co:
voxlect-indic-whisper-large-v3 is an open source model from GitHub that offers a free installation service, and any user can find voxlect-indic-whisper-large-v3 on GitHub to install. At the same time, huggingface.co provides the effect of voxlect-indic-whisper-large-v3 install, users can directly use voxlect-indic-whisper-large-v3 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
voxlect-indic-whisper-large-v3 install url in huggingface.co: