Error using speech2text
7 views (last 30 days)
Show older comments
Hi
When I downloaded speech2text in MATLAB 2018a and trying to run I am getting the following error:
Output argument "tableOut" (and maybe others) not assigned during call to
"BaseSpeechClient/speechToText".
Error in speech2text (line 45)
tableOut = connection.speechToText(y,fs,timeOut)
Error in stt (line 7)
outInfo = speech2text(speechObject,samples,fs,'HTTPTimeOut',25)
Immediate help is required
2 Comments
Adam Danz
on 6 Dec 2019
Error in speech2text (line 45)
but speech2text() from that submission only has 40 lines. So either you're working with a different function or a different version of the function. If this is the correct file exchange submission you may want to download the newest version of the code and follow the instructions in the setup() file included with that submission.
Just FYI, I have never used this submission nor have I downloaded it.
Answers (3)
Adam Danz
on 6 Dec 2019
Edited: Adam Danz
on 13 Dec 2019
Update: checklist of requirements
I am not a contributor to the speech2text FEX submission. Here is a list of requirements summarized from the comments below this answer.
Since several functions in the speech2text submission are protected by p-codes or interface with 3rd party APIs, troubleshooting capabilities are limited.
At the bare minimum you must satisfy these equirements.
- You're using the most recent, up-to-date release of speech2text
- Your using Matlab r2017a or later (according to the FEX page)
- You're following the exact instructions listed in the setup.m file included in the submision and explained in the "Examples" tab of the speech2text FEX page.
- You have access to the 3rd party speech APIs which include Google™ Cloud Speech-to-Text API (which apparently costs money after the first 60 minutes), IBM™ Watson Speech to Text API, or Microsoft™ Azure Speech Services API, all of which require license.
- You must have the Audio Toolbox installed.
Original Answer below
Hmmm..... it still looks like you're not using the most recent version.
In this section of your error stack
Error in speech2text (line 39)
tableOut = connection.speechToText(y,fs,timeOut);
the tableOut variable is assigned on line 39 but in the latest version of the code, that line of code is on line 45. I think you have the old and the new versions of the files on your matlab path but matlab is still using the old version.
Based on comments left on the file exchange page, I suggest taking the following steps.
- Remove the old file from your matlab path (keep it for now but just remove it so matlab doesn't have access to it).
- Shut down and restart Matlab
- Add the path to the new files
- run the setup.m file that came with that submission
- try your code again
Please let me know if that worked or not in the comment below.
For what it's worth, I tried the submission but I don't have a Google authorization file (JSON file) so I could not proceed past the window that requests the file:
8 Comments
Adam Danz
on 13 Dec 2019
Edited: Adam Danz
on 13 Dec 2019
Hi Akshatha,
As I mentioned a few comments above, since I don't have access to the Speech Recognition API nor to the content of the p-codes within the speech2text files, I can't really offer more advice than I already have.
At the bare minimum you must verify with 100% certainty the following requirements.
- You're using the most recent, up-to-date release of speech2text
- Your using Matlab r2017a or later (according to the FEX page)
- You're following the exact instructions listed in the setup.m file included in the submision.
- You have access to the 3rd party speech APIs which include Google™ Cloud Speech-to-Text API (which apparently costs money after the first 60 minutes), IBM™ Watson Speech to Text API, or Microsoft™ Azure Speech Services API
- To use speech2text, you must also have the Audio Toolbox installed.
Lastly, go to the speech2text FEX page and select the "Examples" tab. It provides detailed instructions on how to set up the API.
If you have verified those requirements, the problem likely resides within the code and since much of it is encrypted, my hands are tied.
jibrahim
on 13 Dec 2019
Hi Akshatha,
I am trying to get to the bottom of this. Can you please let me know what you get qwith the following:
1) which GoogleSpeechClient -all
How many hits do you get? I wonder if you have multiple clashing versions.
2) ver('audio')
What is the output of this function?
3) Please try to execute this line of code to make sure you have a license to execute functionality from audio toolbox:
mfcc(randn(1e5,1),44100);
10 Comments
Akshatha Prasad
on 19 Dec 2019
Hi,
My problem got resolved with IBM Watson speech to text service.
I have tried with google but that is popping out an error. I think it is something to do with GoogleSpeech.p file where it is showing the error.
Thanks for helping me to understand the issue,
1 Comment
See Also
Categories
Find more on Audio I/O and Waveform Generation in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!