Conversation
- Add sherpa-onnx JNI libraries for all architectures (arm64-v8a, armeabi-v7a, x86, x86_64) - Add VITS-Piper TTS models: kusal-medium and lessac-medium - Include espeak-ng-data for phoneme processing
Resolves conflict in TTSWrapper.kt: kept main's refactored createTrack() helper method over HEAD's inline version, which had a null-pointer bug (called track!! after track?.release() without reassigning track). https://claude.ai/code/session_01NxcyS3BWxggkFHcJvwNxmR
- Tts.kt: remove unreliable finalize() override; have release() call free() directly to ensure prompt native memory reclamation - TTSService.kt: remove duplicate startForeground() call in hookSystem(); guard onTrimMemory() with isInitialized check to prevent NPE if the callback fires before onCreate() completes - TTSWrapper.kt: track the BufferWriter thread and join it (200 ms max) in shutdown() before releasing the AudioTrack, preventing a use-after- free race; add null check for MediaPlayer.create() in addEarcon() to avoid a crash when the resource cannot be loaded - AiTtsPreloader.kt: replace @volatile fields used in non-atomic compound check-then-act operations with a single stateLock; all mutations of preloadedPlayer/preloadedModelId/isPreloading are now performed inside synchronized(stateLock) blocks - TTSPlayer.kt: guard every withUIContext callback in the AI engine init coroutine with isDisposed checks to prevent post-destroy context access https://claude.ai/code/session_01NxcyS3BWxggkFHcJvwNxmR
- TTSPlayer: add aiEngineInitializing flag to prevent concurrent AI engine init coroutines from each calling continueStart() on completion (#25); track aiSpeakThread as a daemon thread so synthesis never blocks JVM shutdown, and interrupt it in stop()/destroy() (#3) - TTSSettingsActivity: hide the AI voice preset setting — all bundled VITS-Piper models are single-speaker (sid=0) so the selector had no audible effect; remove now-unused AiVoicePreset import (#22) - AiAudioPlayer: clamp PCM samples to [-1,1] before int conversion and use explicit bit masking to match the correct AiTtsTestViewModel implementation and avoid audio corruption on out-of-range samples (#11) - NovelLibraryApplication: call AiTtsPreloader.shutdown() in onTerminate() to cancel the coroutine scope and release the cached player on graceful app termination (#5) - TextToSpeechControlsActivity: remove unused androidx.compose.runtime.remember import (#28) https://claude.ai/code/session_01NxcyS3BWxggkFHcJvwNxmR
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.
No description provided.