AndraxDev / speak-gpt

Your personal voice assistant based on OpenAI ChatGPT.
https://play.google.com/store/apps/details?id=org.teslasoft.assistant
Apache License 2.0
286 stars 59 forks source link

Bug: Crash when using Whisper for ASR (STT) #136

Open technopagan opened 4 months ago

technopagan commented 4 months ago

Reproduce: select Whisper for ASR in options, then press Microphone button in chat.

Only happens since latest version. Worked before.

Java Crash Report:

===== BEGIN OF CRASH =====
java.lang.IllegalStateException
    at android.media.MediaRecorder.start(Native Method)
    at org.teslasoft.assistant.ui.activities.ChatActivity.O(Unknown Source:137)
    at org.teslasoft.assistant.ui.activities.ChatActivity.w(Unknown Source:111)
    at ya.h.onClick(Unknown Source:369)
    at android.view.View.performClick(View.java:7729)
    at android.view.View.performClickInternal(View.java:7706)
    at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0)
    at android.view.View$PerformClick.run(View.java:30484)
    at android.os.Handler.handleCallback(Handler.java:959)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loopOnce(Looper.java:232)
    at android.os.Looper.loop(Looper.java:317)
    at android.app.ActivityThread.main(ActivityThread.java:8501)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)

===== END OF CRASH =====
AndraxDev commented 2 months ago

1) Which Android version are you using? 2) Latest version is 4.15 or 4.16 Preview? 3) Test with new version 4.17.

technopagan commented 2 months ago

@AndraxDev

  1. Android 14
  2. Tested on 4.16
  3. Crash still happens on 4.17

I have completely reset the app and ensured that all necessary permissions are given.

As soon as I select OpenAI Whisper for STT and then press the microphone button, the crash happens (reproducible on app version 4.17 on Android 14 at 20240819)

technopagan commented 2 months ago

App has been crashed and needs to be restarted.

===== BEGIN SYSTEM INFO =====
Android version: 14 (API 34 REL)
ROM version: --(redacted for privacy)--
App version: 4.17 (417)
Device model: --(redacted for privacy)--
Android device ID: --(redacted for privacy)--
Installation ID: --(redacted for privacy)--
Teslasoft ID version: 1.4.0-speakgpt (140101)
Effective time: 2024-08-19T15:37:45.001453Z
===== END SYSTEM INFO =====

===== BEGIN OF CRASH =====
java.lang.IllegalStateException
    at android.media.MediaRecorder.start(Native Method)
    at org.teslasoft.assistant.ui.activities.ChatActivity.O(Unknown Source:137)
    at org.teslasoft.assistant.ui.activities.ChatActivity.w(Unknown Source:108)
    at ya.h.onClick(Unknown Source:365)
    at android.view.View.performClick(View.java:7729)
    at android.view.View.performClickInternal(View.java:7706)
    at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0)
    at android.view.View$PerformClick.run(View.java:30484)
    at android.os.Handler.handleCallback(Handler.java:959)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loopOnce(Looper.java:232)
    at android.os.Looper.loop(Looper.java:317)
    at android.app.ActivityThread.main(ActivityThread.java:8501)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)

===== END OF CRASH =====
AndraxDev commented 2 months ago

Can you please provide the following info:

AndraxDev commented 2 months ago

Additionally tested on: New chat, existing chat, normal button usage, spamming record button.

AndraxDev commented 2 months ago

Note: Since app's code is obfuscated I can only see approximate error reason (but not exact line numbers) so I require some additional information.