Kotoba-Whisper-Bilingual is a collection of distilled Whisper models trained for
Japanese ASR
English ASR
Speech-to-text translation (Japanese -> English)
Speech-to-text translation (English -> Japanese)
developed through the collaboration bewteen Asahi Ushio and Kotoba Technologies. Following the original work of distil-whisper (Robust Knowledge Distillation via Large-Scale Pseudo Labelling), we employ OpenAI's Whisper large-v3 as the teacher model for Japanese and English ASR, while we translate the transcription into English and Japanese by external LLM to obtain training dataset for speech-to-text translation. We employ ReazonSpeech for Japanese ASR and Japanese speech to English text translation, and Multilingual LibriSpeech for English ASR and English speech to Japanese text translation. Kotoba-whisper-bilingual's loss objective consists of cross-entropy on both of ASR and translation tasks, while KL divergence loss only for ASR task. The student model consists the full encoder of the teacher large-v3 model and the decoder with two layers initialized from the first and last layer of the large-v3 model.
We compare our kotoba-whisper-bilingual with OpenAI whisper models, kotoba-whisper models, and cascaded models for translation. Worth noting that kotoba-whisper-bilingual is the only model that can do Japanese and English ASR and speech-to-text translation between Japanese and English, as OpenAI whisper is not trained for English to Japanese speech-to-text translation, and other models are specific to the Task (eg. kotoba-whisper is Japanese ASR and distil whisper is English ASR only).
Speech2Text Translation (Japanese->English): WER (smaller is better)#
Although the cascaded approach is better in translation task, due to the nature of cascaded approach, the pipeline has additional complexity and memory consumption compared to the single end2end models for the sake of high accuracy. Following table shows the mean inference time on a single RTX 4090 (VRAM 24 GB) in second averaged over 10 trials on audio sample with different durations, along with the parameter size.
Kotoba-Whisper is supported in the Hugging Face 🤗 Transformers library from version 4.39 onwards. To run the model, first install the latest version of Transformers.
transformersSpeech recognition with the transformers pipeline.
import os
os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com"
from transformers import pipeline
asr = pipeline("automatic-speech-recognition", model="kotoba-tech/kotoba-whisper-bilingual-v1.0", revision="5b2c01ec5bc234cd784e9187e74bc86582ed5944")
print(asr("audio.wav")["text"])