HuggingFace Repository#

This tutorial is available as an IPython notebook at malaya-speech/example/huggingface-repository.

Starting Malaya-Speech 1.2.6, you can load Malaya-Speech models from https://huggingface.co/huseinzol05 to get better download speed, and by default Malaya-Speech will use HuggingFace as backend repository.

[1]:
import malaya_speech
[2]:
malaya_speech.__version__
[2]:
'1.2.6.1'

Load model from Backblaze#

If you found some models not exist in HuggingFace, you can try to use BackBlaze as alternative,

  1. First, set global MALAYA_USE_HUGGINGFACE = false,

os.environ['MALAYA_USE_HUGGINGFACE'] = 'false'
import malaya_speech
  1. Simply pass use_huggingface=False in load model function parameter, for an example,

malaya_speech.stt.deep_ctc(model = 'hubert-conformer-tiny', use_huggingface = False)
[3]:
malaya_speech.stt.deep_ctc(model = 'hubert-conformer-tiny', use_huggingface = False)

[3]:
<malaya_speech.model.wav2vec.Wav2Vec2_CTC at 0x10c539b50>