AndraxDev/speak-gpt

Bug: Crash when using Whisper for ASR (STT)

technopagan opened this issue · 6 comments

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 =====

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

@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)


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 =====

Can you please provide the following info:

  • Device model (maybe custom ROM put additional limitations) (Tested on: Xiaomi Poco X3, Xiaomi Poco X6, Samsung Galaxy S23, Samsung Galaxy S24, Google Pixel 5/6/7/8 (It's all real devices, no emulators), Android versions 9-14 (Pure Android, heavy modified ROMs)
  • App settings (AI model, individual chat settings, UI settings (sometimes errors are going from here))

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

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.