Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/summary/summary/core/celery_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ def format_segments(transcription_data):
else:
formatted_output += f" {text}"
previous_speaker = speaker
formatted_output = formatted_output.replace(
"Vap'n'Roll Thierry", "[texte impossible à transcrire]"
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice work! Could you try making it extensible, following the Open–Closed Principle?
I’d suggest adding a settings parameter that takes a list of tuples, so we can easily configure any desired replacements.

Also, I’m curious, could you explain why you’re performing the replacement on formatted_output instead of the original text?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I did the replacement in formatting because cleaning can be considered a form of formatting but i can change it and make a cleaning function before the formatting.

return formatted_output


Expand Down
Loading