Skip to content

[Bug] rich_transcription_postprocess shows a repeated event emoji again after a segment with text #3930

Closed

Description

@nurlanmnn

🐛 Bug

rich_transcription_postprocess drops a repeated event emoji only once. When the same event (Applause, Cough, ...) starts three language segments in a row and the middle one has text, the third emoji comes back.

After stripping the repeated emoji from a segment, the loop sets cur_ent_event = get_event(s_list[i]) on the stripped text. For 👏world that is now world, so the current event becomes None and the next 👏 is not treated as a repeat. Event-only segments are fine because they hit the empty-segment continue first. The same code is in the onnx and libtorch copies.

To Reproduce

  1. Install from main.
  2. Run the code below.

Code sample

from funasr.utils.postprocess_utils import rich_transcription_postprocess

print(rich_transcription_postprocess(
    "<|en|><|Applause|>hello<|en|><|Applause|>world<|en|><|Applause|>again"
))

Expected behavior

👏hello world again, the same as the two-segment case 👏hello world.

Error logs

No error. Actual output:

👏hello world👏again

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions