yky-h's picture
Add model
466ac7c
|
raw
history blame
2.89 kB
metadata
thumbnail: https://github.com/rinnakk/japanese-pretrained-models/blob/master/rinna.png
language: ja
license: apache-2.0
datasets: reazon-research/reazonspeech
inference: false
tags:
  - data2vec
  - speech

rinna/japanese-data2vec-audio-base

rinna-icon

Overview

This is a Japanese data2vec Audio Base model trained by rinna Co., Ltd.


How to use the model

import soundfile as sf
from transformers import AutoFeatureExtractor, AutoModel

model_name = "rinna/japanese-data2vec-audio-base"
feature_extractor = AutoFeatureExtractor.from_pretrained(model_name)
model = AutoModel.from_pretrained(model_name)
model.eval()

raw_speech_16kHz, sr = sf.read(audio_file)
inputs = feature_extractor(
    raw_speech_16kHz,
    return_tensors="pt",
    sampling_rate=sr,
)
outputs = model(**inputs)

print(f"Input:  {inputs.input_values.size()}")  # [1, #samples]
print(f"Output: {outputs.last_hidden_state.size()}")  # [1, #frames, 768]

A fairseq checkpoint file can also be available here.


How to cite

@misc{rinna-japanese-data2vec-audio-base, 
  title={rinna/japanese-data2vec-audio-base}, 
  author={Hono, Yukiya and Mitsui, Kentaro and Sawada, Kei},
  url={https://huggingface.co/rinna/japanese-data2vec-audio-base}
}

Citations

@inproceedings{baevski2022data2vec,
  title={Data2vec: A general framework for self-supervised learning in speech, vision and language},
  author={Baevski, Alexei and Hsu, Wei-Ning and Xu, Qiantong and Babu, Arun and Gu, Jiatao and Auli, Michael},
  booktitle={International Conference on Machine Learning},
  pages={1298--1312},
  year={2022},
  organization={PMLR},
  doi={10.48550/arXiv.2202.03555}
}

License

The Apache 2.0 license