Skip to content

fix: sync detected_language when recognition language is changed in frontend#551

Open
octo-patch wants to merge 1 commit intoHuanshere:mainfrom
octo-patch:fix/issue-549-sync-detected-language
Open

fix: sync detected_language when recognition language is changed in frontend#551
octo-patch wants to merge 1 commit intoHuanshere:mainfrom
octo-patch:fix/issue-549-sync-detected-language

Conversation

@octo-patch
Copy link
Copy Markdown

Fixes #549

Problem

When a user switches the recognition language in the frontend sidebar, only whisper.language was updated in the config, but whisper.detected_language was left unchanged. This caused NLP segmentation failures and other issues in subsequent steps because:

  • core/spacy_utils/load_nlp_model.py reads whisper.detected_language to pick the right NLP model (when language is not English)
  • core/_3_2_split_meaning.py reads whisper.detected_language when whisper.language is set to auto

Solution

When the user manually selects a recognition language, also update whisper.detected_language to the same value, so both fields stay in sync.

Testing

Manually verified that after changing the recognition language in the UI sidebar, whisper.detected_language in the config is correctly updated to match the selected language.

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.

关于前端切换语言后端不同步的问题

1 participant