Skip to content

TT-7360 feat: Implement Careful Speech functionality with waveform segment management#340

Open
gtryus wants to merge 1 commit into
developfrom
TT-7360-careful
Open

TT-7360 feat: Implement Careful Speech functionality with waveform segment management#340
gtryus wants to merge 1 commit into
developfrom
TT-7360-careful

Conversation

@gtryus
Copy link
Copy Markdown
Contributor

@gtryus 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.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants