#!/usr/bin/env python # coding: utf-8 # In[1]: get_ipython().run_line_magic('reload_ext', 'autoreload') get_ipython().run_line_magic('autoreload', '2') get_ipython().run_line_magic('matplotlib', 'inline') import os os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID"; os.environ["CUDA_VISIBLE_DEVICES"]="0" # In[2]: # get sample wav file get_ipython().system('wget -O /tmp/sample.wav https://github.com/amaiya/ktrain/blob/develop/ktrain/tests/text_data/sample.wav?raw=true') # In[3]: from ktrain.text.speech import Transcriber # In[4]: transcriber = Transcriber() # In[5]: afiles = ['/tmp/sample.wav'] result = transcriber.transcribe(afiles) result # In[ ]: