Skip to content

OPL: pronunciation test audio preview PR #25 #27

Description

@DigiJoe79

Feature planed for after Docker refactoring

PR from @codesterribly

This PR adds a pronunciation test audio preview feature.

Changes included:

Updated backend endpoint POST /api/pronunciation/rules/test-audio
Applies the test pronunciation rule to the segment text
Uses the segment’s engine, model, language, and speaker to generate audio
Writes a short preview file under OUTPUT_DIR/previews
Returns audio_path pointing to the preview file
Updated frontend error translator
Added mappings for new pronunciation test audio error codes
Only two files are modified:

backend/api/pronunciation.py
frontend/src/utils/translateBackendError.ts
This enables users to preview how a rule affects audio output before saving the rule.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions