speech_to_text python command not working

2017-09-17 Thread pizza python
   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 
 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 amd64interactive 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  python33.5.1-3  amd64interactive high-level
   object-ori

References

   Visible links
   1. https://github.com/rmotr/speech-to-text
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: speech_to_text python command not working

2017-09-18 Thread pizza python
 Speech to text conversion is not a pure Python solution. It must be
 based
 on some kind of "external service". From the details you have provided,
 it looks like some web service.


   Yes, you are right. It's based on IBM Watson's web/cloud service.

 Your error occurs because what the "external service" has delivered
 it not what "speech-to-text" has expected. More precisely,
 "speech-to-text" has excepted as result a dict with a "results" key --
 but this is missing (likely because some input is wrong or there
 is a version mismatch between your "speech-to-text" and the "external
 service").


   Someone else also thought there is a version mismatch between the
   "speech-to-text" and the "external service". The external service has been
   update four times since the "speech-to-text" library was put together.


 I expect that the "data" mentioned in the traceback above contains
 some clues for what went wrong. I would use the Python debugger
 to investigate along these lines. As you are not yourself a Python
 programmer, find one in your region to support you.


   Could someone kindly advise how to use "the Python debugger"?

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: speech_to_text python command not working

2017-09-18 Thread pizza python
   On Mon, Sep 18, 2017 at 1:11 AM, Paul  wrote:

 On 18 September 2017 at 09:03, pizza python wrote:
 >  Your error occurs because what the "external service" has
 delivered
 >  it not what "speech-to-text" has expected. More precisely,
 >  "speech-to-text" has excepted as result a dict with a "results"
 key --
 >  but this is missing (likely because some input is wrong or there
 >  is a version mismatch between your "speech-to-text" and the
 "external
 >  service").
 >
 >
 >Someone else also thought there is a version mismatch between the
 >"speech-to-text" and the "external service". The external service
 has been
 >update four times since the "speech-to-text" library was put
 together.

 So it's pretty likely you need a new version of the "speech-to-text"
 library.


   Hi, Paul. Thanks for your reply. Appreciate it a lot.

   I've informed the developer of this issue on both his blog and his github.
   Hope he can update his "speech-to-text" library to make it work with IBM
   Watson. It was so good when it was working that the lead of the "developer
   advocacy team" at IBM Watson reached out to him!


 >  I expect that the "data" mentioned in the traceback above
 contains
 >  some clues for what went wrong. I would use the Python debugger
 >  to investigate along these lines. As you are not yourself a
 Python
 >  programmer, find one in your region to support you.
 >
 >
 >Could someone kindly advise how to use "the Python debugger"?

 [1]https://docs.python.org/3.6/library/pdb.html - but I would reiterate
 the advice that if you're not a programmer, you should get someone who
 is to assist you with this, as the debugger will not be easy to use
 without programming experience (and fixing the problem even more so).


   Thanks for your sound advice. As I'm already quite overwhelmed with this
   error as it is, I'll recognize my current limitations and seek help from
   the more experienced.  Thanks

References

   Visible links
   1. https://docs.python.org/3.6/library/pdb.html
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: speech_to_text python command not working

2017-09-18 Thread pizza python
   Hi all. I tried the same command with a different, smaller file. This file
   is a 90-kilobyte ogg file. The other one was a 26-megabyte ogg file.

   Wtih this smaller file, there was no error.


speech_to_text -u myUsername -p myPassword -f html -i audio-file.ogg
   transcript.html
   Starting Upload.
   
[===]
   100%
   Upload finished. Waiting for Transcript
   Speech > Text finished.


   In the same folder as the ogg file was an html file with the transcript.
   So I guess the python command works some times. I'm still not sure if it
   just doesn't work on large files.
-- 
https://mail.python.org/mailman/listinfo/python-list