Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- from pocketsphinx import AudioFile, get_model_path, get_data_path
- model_path = get_model_path()
- data_path = get_data_path()
- config = {
- 'verbose': False,
- 'audio_file': os.path.join(data_path, '2018-11-21T18_17_27.209Z.wav'),
- 'buffer_size': 2048,
- 'no_search': False,
- 'full_utt': False,
- 'hmm': os.path.join(model_path, 'es-es'),
- 'lm': os.path.join(model_path, 'es-20k.lm.bin'),
- 'dict': os.path.join(model_path, 'es.dict')
- }
- audio = AudioFile(**config)
- for phrase in audio:
- print(phrase)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement