osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

speech_to_text python command not working


   Hello all.


   I'm on Linux Mint 18.2 Cinnamon 64-bit.

   I am trying to get IBM Watson BlueMix Speech-To-Text to transcribe my
   spoken-word audio files. Because I'm not a coder, I tried to find the
   simplest way to use BlueMix Speech-to-Text. And what I found
   is [1]https://github.com/rmotr/speech-to-text

   It's in PyPi Libary: https://pypi.python.org/pypi/speech-to-text/0.0.1

 Step 1: "pip install speech-to-text". I ran it with sudo to make it work.




 Step 2: I then ran: speech_to_text -u myUserNameGoesHere -p myPasswordGoesHere
 -f html -i voice2.ogg transcript.html Starting Upload.
 [=========================================================================]
 100% Upload finished. Waiting for Transcript Traceback (most recent call last):
 File "/usr/local/bin/speech_to_text", line 11, in <module>
 sys.exit(speech_to_text()) File
 "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in __call__
 return self.main(*args, **kwargs) File
 "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main rv =
 self.invoke(ctx) File "/usr/local/lib/python2.7/dist-packages/click/core.py",
 line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File
 "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
 return callback(*args, **kwargs) File
 "/usr/local/lib/python2.7/dist-packages/speech_to_text/command.py", line 60, in
 speech_to_text formatted_output = FormatterClass().format(result) File
 "/usr/local/lib/python2.7/dist-packages/speech_to_text/formatters.py", line 36,
 in format for obj in self._parse(data)) File
 "/usr/local/lib/python2.7/dist-packages/speech_to_text/formatters.py", line 10,
 in _parse for obj in data[`results']) KeyError: `results'



   __________

   I was expecting an html with the transcript. So why did I get the errors
   above?







    python
   Python 2.7.12 (default, Nov 19 2016, 06:48:10)
   [GCC 5.4.0 20160609] on linux2

   __________________________________

    dpkg -l python
   Desired=Unknown/Install/Remove/Purge/Hold
   |
   Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
   |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
   ||/ Name           Version      Architecture Description
   +++-==============-============-============-=================================
   ii  python         2.7.11-1     amd64        interactive high-level
   object-ori
   ____________________________________

   python3
   Python 3.5.2 (default, Nov 17 2016, 17:05:23)
   [GCC 5.4.0 20160609] on linux

   ____________________________________

    dpkg -l python3
   Desired=Unknown/Install/Remove/Purge/Hold
   |
   Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
   |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
   ||/ Name           Version      Architecture Description
   +++-==============-============-============-=================================
   ii  python3        3.5.1-3      amd64        interactive high-level
   object-ori

References

   Visible links
   1. https://github.com/rmotr/speech-to-text