Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error com.google.gson.JsonSyntaxException on ListeningState #69

Open
Halleck45 opened this issue Jun 1, 2023 · 4 comments
Open

Error com.google.gson.JsonSyntaxException on ListeningState #69

Halleck45 opened this issue Jun 1, 2023 · 4 comments

Comments

@Halleck45
Copy link

Hi!

Thanks for your work!

I have this error when I click on the Idiolect button. I don't know how to fix it.

Thanks for your help

2023-06-01 07:50:31,674 [1148013]   INFO - #org.openasr.idiolect.asr.ListeningState - ListeningState -> STARTED
2023-06-01 07:50:36,488 [1152827]   WARN - #org.openasr.idiolect.asr.AsrControlLoop - Failed to process utterance: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Expected ':' at line 3 column 33 path $.alternatives[0].124054
	at com.google.gson.internal.Streams.parse(Streams.java:61)
	at com.google.gson.JsonParser.parseReader(JsonParser.java:102)
	at com.google.gson.JsonParser.parseReader(JsonParser.java:70)
	at com.google.gson.JsonParser.parseString(JsonParser.java:51)
	at org.openasr.idiolect.asr.vosk.VoskAsr.parseVosk(VoskAsr.kt:207)
	at org.openasr.idiolect.asr.vosk.VoskAsr.tryParseResult(VoskAsr.kt:202)
	at org.openasr.idiolect.asr.vosk.VoskAsr.waitForSpeech(VoskAsr.kt:193)
	at org.openasr.idiolect.asr.AsrControlLoop.run(AsrControlLoop.kt:86)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: com.google.gson.stream.MalformedJsonException: Expected ':' at line 3 column 33 path $.alternatives[0].124054
	at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1659)
	at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:539)
	at com.google.gson.stream.JsonReader.peek(JsonReader.java:433)
	at com.google.gson.internal.bind.TypeAdapters$28.read(TypeAdapters.java:786)
	at com.google.gson.internal.bind.TypeAdapters$28.read(TypeAdapters.java:725)
	at com.google.gson.internal.Streams.parse(Streams.java:49)
	... 8 more

on Ubuntu 22.04

@nalbion
Copy link
Member

nalbion commented Jun 1, 2023

Hi @Halleck45 , we haven't tested this on Ubuntu - we use Windows and OSX. @breandan may have more luck reproducing the problem. My guess is that Vosk is returning an error message that we've not seen before.

I'm currently working on speech to text using Whisper. For now you could try the idiolect-azure plugin

@Halleck45
Copy link
Author

Hi,

I have the same issue after installation of idiolect-azure. Plugin is configured and enabled, and speech service is enabled on the Azure portal.

Capture d’écran du 2023-06-01 09-08-45

@nalbion
Copy link
Member

nalbion commented Jun 1, 2023

I did come across an issue the other day where alternative Speech Recognition providers were not being activated properly. I've just pushed the fix for that to the develop branch. Hopefully I'll have a new release available in the IntelliJ marketplace in about a week with better off-line speech recognition and support for switching between tabs.

@Halleck45
Copy link
Author

Now with the latest update:

java.lang.AbstractMethodError: Receiver class org.openasr.idiolect.asr.azure.AzureAsr does not define or inherit an implementation of the resolved method 'abstract boolean startRecognition()' of interface org.openasr.idiolect.asr.AsrProvider.
	at org.openasr.idiolect.asr.AsrControlLoop.startRecognition(AsrControlLoop.kt:32)
	at org.openasr.idiolect.asr.AsrService.activate(AsrService.kt:127)
	at org.openasr.idiolect.actions.VoiceRecordControllerAction.actionPerformed(VoiceRecordControllerAction.kt:28)
	at com.intellij.openapi.actionSystem.impl.ActionButton.actionPerformed(ActionButton.java:228)
	at com.intellij.openapi.actionSystem.impl.ActionButton.lambda$performAction$2(ActionButton.java:207)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:356)
	at com.intellij.openapi.actionSystem.impl.ActionButton.performAction(ActionButton.java:207)
	at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(ActionButton.java:518)
	at java.desktop/java.awt.Component.processEvent(Component.java:6421)
	at java.desktop/java.awt.Container.processEvent(Container.java:2266)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5026)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2804)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:790)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:731)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:763)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:761)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:760)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:667)
	at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.kt:615)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:570)
	at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:68)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:349)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:348)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:348)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:343)
	at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:995)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:113)
	at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:995)
	at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$4(IdeEventQueue.kt:343)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:831)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:385)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants