xinjli / allosaurus

Allosaurus is a pretrained universal phone recognizer for more than 2000 languages
GNU General Public License v3.0
532 stars 85 forks source link

Allosaurus function to perform phoneme recognition without having to run the library as an executable #12

Closed babat00nday closed 3 years ago

babat00nday commented 3 years ago

Hi,

Currently, the only way to perform phoneme recognition with allosaurus is to run a command in a cli type interface with the following structure python -m allosaurus.run [--lang <language name>] [--model <model name>] [--device_id <gpu_id>] [--output <output_file>] -i <audio file/directory>.

It would be great if there was a function within the library that can also do something similar for example from allosaurus.app import read_recognizer, speech_recognizer ... phoneme_seq = speech_recognizer.recognize(model_name, speech_wav_file, other_config) ...

xinjli commented 3 years ago

Hi,

This feature is supported :) Please check the updated README.

Thanks!