try commenting this line out
--texttospeech.enableDebug()
try commenting this line out
--texttospeech.enableDebug()
by removingĀ texttospeech.enableDebug() the simulator works and show:
WARNING: The āplugin.texttospeechā library is not available on this platform.
When built and run for iOS, there were same result of erros
Runtime error - attempt to index a function value
Xcode console
Nov 3 10:03:33 Wilson-iPhoneSE plugins-sample-texttospeech-master[8393] \<Notice\>: ERROR: Runtime errorattempt to index a function value stack traceback: [C]: in function 'init' /Users/lwkApple/Desktop/plugins-sample-texttospeech-master/main.lua:38: in main chunk Nov 3 10:03:33 Wilson-iPhoneSE plugins-sample-texttospeech-master[8393] \<Notice\>: Runtime Error: Runtime error: attempt to index a function value stack traceback: [C]: in function 'init' /Users/lwkApple/Desktop/plugins-sample-texttospeech-master/main.lua:38: in main chunk
The sample project no longer works. I donāt know if the two problems below are the result of Mac OS Sierra and/or XCode 8.1. But, this is really crazy. Iāve had the old text to speech plugin working and submitted my apps to Google Play and the App Store. And now, I find myself without the ability to continue development with Corona after 2 years of development, unless this plugin can function! So, to say Iām a bit disappointed would be a gross understatement.
Here are the clear problems for anyone who will take the time to verify and fix.
under Mac OS Sierra, after commenting out line 15 of main.lua (to resolve one problem), Corona outputs āWARNING: The āplugin.texttospeechā library is not available on this platform.ā
even if I go to the trouble of building the project for iOS, and then install it on my iPhone 6 Plus, the app loads up with the message, āRuntime error - attempt to index a function valueā
Please help!
troylyndon, looks like something wrong with plugin update. In your home folder, try to go to ~/Library/Application Support/ and delete Corona folder, it contains downloaded plugin.
Wilson solved the problem on Mac Sierra - it turns out that the old text-to-speech plug-in was cached (just as you suspected Lerg) ā¦Android now works, but iOS still doesnāt
troylyndon, darn, I need to buy an iOS 10 device. If itās urgent, you can fall back to the old plugin (if it somehow works) before Corona 2979, but you have to use the old syntax.
I am trying to boot up iOS 10 simulator, takes ages for some reason.
Yes the simulator version works after removingĀ Ā ~/Library/Application Support/Corona folderā¦
However, same problem for both iOS and Android build of your sample codeā¦
iOS
Runtime error - attempt to index a function value
Android:
main.lua:15:attempt to call field āenableDebugā (a nil value).
itās confirmed - thatās iOS 10 issue. Now I need something to debug on.
On Android if enableDebug() is not found that means the plugin is old, sure using the latest Corona version?
@troylyndon and anyone else having issues on iOS 10
I donāt know the details of your implementations, butĀ if you donāt need to call getLanguagesAndVoices()Ā and you donāt need to hook into any onComplete events, then you should be able to safely call init() without passing any parameters , and you should still be able to use speak(), just donāt specify an onComplete etc. callback in the params.
I had a similar error message. Deauthorizing Corona Simulator and logging on again solved it.
Iāve just got a new iPad Pro and now I see the error myself. Now I can debug it.
Found the issue, it only happened on iOS devices with 64bit CPU like all modern iOS devices only. Just uploaded the new build.
@Lerg, oddly, any idea what this problem is? I removed the cached plugins beforehand. And now, although it works on Mac, I cannot get a build to finish properly to test it on iOS. Iām running build 2984 (latest).
ERROR: with exit code 1 and output:
/Users/troylyndon/Documents/plugins-sample-texttospeech-master.app: resource fork, Finder information, or similar detritus not allowed
BUILD ERROR: ERROR: code signing failed: /Users/troylyndon/Documents/plugins-sample-texttospeech-master.app: resource fork, Finder information, or similar detritus not allowed
iOS build failed (12) after 30 seconds
ERROR: Build Failed: ERROR: code signing failed: /Users/troylyndon/Documents/plugins-sample-texttospeech-master.app: resource fork, Finder information, or similar detritus not allowed
troylyndon, errors, errors everywhere. This one though looks like a local issue (not pluginās fault).
http://stackoverflow.com/questions/39652867/code-sign-error-in-macos-sierra-xcode-8-resource-fork-finder-information-or
The good news is that the iOS build and simulator version worked perfectly.
Unfortunately, Android version didnāt work.
same problem at startup as:
main.lua:15:attempt to call field āenableDebugā (a nil value).
When I comment (removed) this line 15. The program started with buttons shown but line 80Ā
print(āInit callbackā)
was never called.
and program crashed when a speech is started.
I built with the latest Corona build 2984.
I tried to de-authorize and re-login but it didnāt help.
wilsonwansun, looks like Iāve accidentally uploaded a wrong binary for Android. Just reuploaded. Will become available in an hour.
@Lerg, it works⦠finally⦠:)Ā :)Ā
Just a remind for all who used the previous version
Remove (Mac) ā~/Library/Application Support/Corona/ā for any cached plugin files.
Use updated Corona SDK (2984 for me)
Use xCode 8.1 for iOS 10.1 build
De-authorize and re-login of Corona Simulator may help.
There are minor changes of API usage from previous version. Please check the āmain.luaā at publisherās sample code at Github:
https://github.com/Lerg/plugins-sample-texttospeech
happy coding.
wilsonwansun, yay! Deauth is not needed as long as the plugins cache is removed.
Corona Simulator is smart to detect that there is a fresh plugin update to download, but for some reason it failed for this particular update. Maybe because Iāve added macOS support, somehow.
Hi Lerg.
Finally got back to working on my app and implementing the new text to speech plugin.
Thanks again for the great work.
Itās excellent that there is now the possibility to save the audio to file, will this eventually work on iOS? And is it possible to save the audio and play it at the same time rather than doing one or the other?
It might be more versatile to break this out into itās own function likeĀ texttospeech.save( filename, baseDir ) ?
Also, remember ages ago I was asking if there was a way of returning aĀ predicted speech time in milliseconds from the speak function? Is this possible now, given the new functionality in the peach engines?