fix: repair broken Record() and improve error handling in APIManager#4
Open
LuciferDono wants to merge 1 commit intoCatrobat:mainfrom
Open
Conversation
…anager
- Replace non-functional StartCoroutine("hi!") in Record() with proper
delegation to ARAppVoiceManager via new public StartRecording() method
- Add StartRecording() to ARAppVoiceManager as public API for external
callers, avoiding the anti-pattern of simulating UI button clicks
- Add null check with debug warning when voiceManager is not assigned
- Include actual error details (www.error) in failure responses instead
of generic "There was an error" message
- Re-enable sendButton after request completes (was left disabled on failure)
- Only trigger TTS playback on successful API responses
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
APIManager.Record()which calledStartCoroutine("hi!")— a non-functional no-op with no matching coroutineStartRecording()public method toARAppVoiceManageras a clean API for external callersSendDataToGas(): include actual error details, re-enable send button on failure, only trigger TTS on successChanges
Assets/Scripts/APIManager.csStartCoroutine("hi!")withvoiceManager.StartRecording(), add null-safetywww.errorinstead of generic message, log errors withDebug.LogError, re-enablesendButtonafter request completes (previously left disabled on failure), guard TTS behind success checkAssets/Scripts/Whisper&TTS/ARAppVoiceManager.csStartRecording()method that delegates to the privateOnRecordButtonPressed(), providing a clean API forAPIManagerand any future external callersTest plan