Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix and enhance Multilingual Text Processing "mix) and Speaker Handling #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Saren-Arterius
Copy link

@Saren-Arterius Saren-Arterius commented Nov 26, 2024

Summary of Changes

This PR addresses several improvements in the text processing pipeline, focusing on better handling of multilingual texts and speaker specifications. Here's a summary of changes:

infer.py

  • Modified the infer_multilang function:
    • Handled cases where sid (speaker ID) might be None. This prevents potential runtime errors when no specific speaker is provided.
    • Critical Fix: Ensured that the "mix" functionality works correctly by using named parameters instead of argument orders.

tools/sentence.py

  • Added a new function move_numbers:
    • Handles scenarios where numbers appear at the start or end of English text segments. This ensures that these numbers are correctly associated with the preceding or following Chinese text.
  • Introduced clean_multiple_spaces:
    • Removes unnecessary multiple spaces within each text segment, improving text formatting consistency.
  • Integrated move_numbers and clean_multiple_spaces:
    • Included these functions into the final sentence list generation process.

webui.py

  • Adjusted the process_auto function:
    • Focused on English and Chinese (["en", "zh"]) target languages instead of including Yue (Cantonese).
  • Updated language tags in process_auto:
    • Converted "ZH" to "YUE".
  • Enhanced debug print statements in process_text:
    • Included speaker information for better traceability.

Proof "mix" works correctly after change:
https://drop.wtako.net/file/32c854febf60319d116297094a430737fff5d8f6.mp3
image

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant