Stopping and then starting a new recording does not begin a new transcript #130
Labels
No labels
blocked:children
blocked:needs-decision
blocked:needs-human
blocked:verify-failed
bug
deferred
enhancement
feature-request
in-progress
needs-decompose
needs-triage
quickfix
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/transcriber#130
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug Description
When a user stops a recording and then starts a new recording session, the new recording does not begin a new transcript. Instead, the new recording appears to continue from the previous transcript or fails to create a fresh transcript entry.
Expected Behavior
Each new recording session should create a new, separate transcript entry in the database.
Steps to Reproduce
Environment
Additional Context
This issue likely relates to how
RecordingSessionentities are created and managed when transitioning between recording states. The session management or transcript initialization logic may not be properly resetting for new sessions.Optimization commit deployed
Pushed
d78d669— performance and reliability fixes across the stack.Audio / TranscriptionService
_transcriptSegmentsusingStateFlow.updaterunBlockinginstopTranscription()withserviceScope.launchBuildConfig.DEBUGguards onLog.din hot paths to eliminate GC pressure in release buildsLocalWhisperTranscriptionProvider
ShortArrayfor PCM samples instead of boxing throughMutableList<Short>CoroutineScopeleak:scope.cancel()now called indestroy()CloudTranscriptionProvider
CoroutineScopeleakOkHttpClientnow injectable via constructorDiarizationProvider
TranscriptSegmentwritesLocalDiarizationProvider(monotonic scan, O(n) total)LLMTopicExtractor / LLMSummarizer / SessionTitleGenerator
SessionTaginserts via newSessionTagDao.insertTags()OkHttpClientinjected via constructor for connection reuseRegexpatterns as companion constantsDatabase
@IndexonRecordingSession(end_time), compound@Index(is_pinned, start_time), andSpeaker(name)insertTags,insertEmbeddings,addSegmentsBuild
buildConfig = trueBuild compiles and all unit tests pass.
Follow-up fix deployed:
9c75ca7Fixes integration issues from the optimization commit:
NoteTag,NoteCrossref,SpeakerEmbeddingentities toAppDatabase(version 7)MIGRATION_6_7for new tables:note_tags,note_crossrefs,speaker_embeddings@Providesmethods inDatabaseModulefor new DAOssetPinned/setTitlemethods toSessionRepository(used by UI)TranscriptionServiceparameter mismatch inSpeechBackend.selectcallFloatArrayConvertertoAppDatabase@TypeConvertersfor embedding BLOB storageFull debug build passes. All unit tests pass.
Offline infrastructure deployed:
79954aaFoundation for full sustained offline functionality:
ConnectivityMonitor— real-time network state trackingOfflineCapabilityTracker— per-feature offline availabilityEnhancementJobqueue — cloud features queue for background processing when onlineLLMModelCatalog— 3 quantized on-device LLMs (Qwen 0.5B, TinyLlama 1.1B, Phi-3 Mini)ModelsScreenextended with LLM model download/activate/deleteBackendConfigScreen— Offline Mode toggleBuild passes, all unit tests pass.
Already fixed in existing code. The
startRecording()/stopRecording()flow properly resets all per-session state:RecordingViewModel.startRecording()cancels any staletranscriptMonitorJob, clears_transcriptSegmentsand_currentPartialText, and creates a freshRecordingSessionbefore starting the foreground service.RecordingViewModel.stopRecording()cancels the monitor, clears_currentSessionId,_currentPartialText, and all active tags.TranscriptionService.startTranscription()defensively stops/destroys any prior provider and wipes_transcriptSegments,_currentTranscript, andrecordedChunkPathsbefore starting the new backend.Each
ACTION_STARTnow creates a completely independent session with no inherited state from the previous recording.