TT-7360 feat: Implement Careful Speech functionality with waveform segment management#340
Open
gtryus wants to merge 1 commit into
Open
TT-7360 feat: Implement Careful Speech functionality with waveform segment management#340gtryus wants to merge 1 commit into
gtryus wants to merge 1 commit into
Conversation
Contributor
gtryus
commented
May 29, 2026
- Added carefulSpeechBoundary.ts and corresponding tests for clause end adjustments and boundary management.
- Introduced carefulSpeechCompletion.ts to handle clause completion logic and related tests.
- Created carefulSpeechFormat.ts for formatting clause ranges.
- Developed useCarefulSpeechSegments.ts for managing segment state and persistence.
- Added transcribeDefaultSegParams.ts for default auto-segment parameters.
- Enhanced WSAudioPlayer with careful speech controls and playback management.
- Updated toolSlug.ts to include CarefulSpeech tool.
- Modified useOfflineSetup.ts and useTools.ts to integrate CarefulSpeech functionality.
- Implemented color management for Careful Speech segments in useWaveSurferRegions.ts.
- Added localization support for Careful Speech in model.tsx and reducers.tsx.
- Created utility functions for Careful Speech segment colors in carefulSpeechSegmentColors.ts.
- Updated namedSegments.ts to define new region types for Careful Speech.
…gment management - Added carefulSpeechBoundary.ts and corresponding tests for clause end adjustments and boundary management. - Introduced carefulSpeechCompletion.ts to handle clause completion logic and related tests. - Created carefulSpeechFormat.ts for formatting clause ranges. - Developed useCarefulSpeechSegments.ts for managing segment state and persistence. - Added transcribeDefaultSegParams.ts for default auto-segment parameters. - Enhanced WSAudioPlayer with careful speech controls and playback management. - Updated toolSlug.ts to include CarefulSpeech tool. - Modified useOfflineSetup.ts and useTools.ts to integrate CarefulSpeech functionality. - Implemented color management for Careful Speech segments in useWaveSurferRegions.ts. - Added localization support for Careful Speech in model.tsx and reducers.tsx. - Created utility functions for Careful Speech segment colors in carefulSpeechSegmentColors.ts. - Updated namedSegments.ts to define new region types for Careful Speech.
Contributor
There was a problem hiding this comment.
Pull request overview
Implements a new Careful Speech step in the renderer, including clause-based waveform segmentation, navigation/recording UI, segment persistence, and localization/tooling integration.
Changes:
- Added Careful Speech UI (player + controls) and supporting utilities/hooks for clause and clause-moves segment management.
- Extended WaveSurfer region coloring/selection logic to support a new Careful Speech segment color mode and more reliable region play-end behavior.
- Integrated the new tool end-to-end (tool slug, offline setup, workflow migration, localization strings/selectors).
Reviewed changes
Copilot reviewed 28 out of 30 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/renderer/src/utils/namedSegments.ts | Adds new named segment buckets for clause and clause-moves. |
| src/renderer/src/utils/carefulSpeechSegmentColors.ts | Introduces Careful Speech waveform region color utilities. |
| src/renderer/src/store/localization/reducers.tsx | Adds Careful Speech localized string bundle and tool label. |
| src/renderer/src/store/localization/model.tsx | Adds Careful Speech localization typings and tool string key. |
| src/renderer/src/store/localization/exported-strings-name.json | Updates exported localization bundle filename reference. |
| src/renderer/src/selector/selectors.tsx | Adds a selector for Careful Speech localization layout. |
| src/renderer/src/routes/PassageDetail.tsx | Routes mobile Careful Speech tool to the new screen component. |
| src/renderer/src/crud/useWavesurferRegions.tsx | Adds Careful Speech region-color mode + region-in/out targeting safeguards. |
| src/renderer/src/crud/useWaveSurfer.tsx | Wires new segment color mode + Careful Speech status ref into regions hook. |
| src/renderer/src/crud/useTools.ts | Registers Careful Speech in the tool slug list. |
| src/renderer/src/crud/useOfflineSetup.ts | Uses the new carefulSpeech tool slug for offline workflow creation. |
| src/renderer/src/crud/toolSlug.ts | Adds ToolSlug.CarefulSpeech. |
| src/renderer/src/components/WSAudioPlayer.tsx | Exposes additional controls (setPlay, auto-segment, load/save regions, Careful Speech color apply). |
| src/renderer/src/components/PassageDetail/transcribeDefaultSegParams.ts | Adds default auto-segmentation params used for clause-moves generation. |
| src/renderer/src/components/PassageDetail/PassageDetailPlayer.tsx | Plumbs Careful Speech status ref + segment playback end callback to WSAudioPlayer. |
| src/renderer/src/components/PassageDetail/PassageDetailGrids.tsx | Adds Careful Speech screen into the main PassageDetail layout logic. |
| src/renderer/src/components/PassageDetail/PassageDetailCarefulSpeech.tsx | New Careful Speech step screen: clause playback, boundary adjustment, recording flow, status coloring. |
| src/renderer/src/components/PassageDetail/carefulSpeech/useCarefulSpeechSegments.ts | New hook for bootstrapping/persisting clause and clause-moves segment buckets. |
| src/renderer/src/components/PassageDetail/carefulSpeech/carefulSpeechFormat.ts | Helper to format clause time ranges for display. |
| src/renderer/src/components/PassageDetail/carefulSpeech/CarefulSpeechControls.tsx | UI controls for boundary adjustment, recording, navigation, and completion. |
| src/renderer/src/components/PassageDetail/carefulSpeech/CarefulSpeechControls.cy.tsx | Cypress component test for CarefulSpeechControls basic rendering. |
| src/renderer/src/components/PassageDetail/carefulSpeech/carefulSpeechCompletion.ts | Logic for determining which clauses are completed and selecting the next incomplete clause. |
| src/renderer/src/components/PassageDetail/carefulSpeech/carefulSpeechCompletion.test.ts | Unit tests for completion and next-clause selection logic. |
| src/renderer/src/components/PassageDetail/carefulSpeech/carefulSpeechBoundary.ts | Logic for snapping clause boundary changes to clause-moves boundaries (or threshold fallback). |
| src/renderer/src/components/PassageDetail/carefulSpeech/carefulSpeechBoundary.test.ts | Unit tests for boundary adjustment and snapping behavior. |
| migration/bold-workflow/insert-bold-workflowsteps.sql | Updates Bold workflow Careful Speech step to use the new carefulSpeech tool/settings. |
| localization/TranscriberAdmin-en.xlf | Adds Careful Speech string units and tool label to localization source. |
| localization/TranscriberAdmin-en-1.2.xliff | Adds Careful Speech string units and tool label to localization source (xliff v1.2). |
Comment on lines
+16
to
+22
| import { | ||
| getCarefulSpeechCompletedColor, | ||
| getCarefulSpeechCurrentColor, | ||
| getCarefulSpeechPendingColor, | ||
| getCarefulSpeechRegionBaseColor, | ||
| type ICarefulSpeechColorStatus, | ||
| } from '../utils/carefulSpeechSegmentColors'; |
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.