server: move out profanity filter to transcript, and implement segmentation

This commit is contained in:
2023-10-19 21:05:13 +02:00
committed by Mathieu Virbel
parent 0d9f66c097
commit b323254376
6 changed files with 78 additions and 19 deletions

View File

@@ -48,10 +48,7 @@ class AudioTranscriptModalProcessor(AudioTranscriptProcessor):
)
response.raise_for_status()
result = response.json()
text = result["text"][source_language]
text = self.filter_profanity(text)
transcript = Transcript(
text=text,
words=[
Word(
text=word["text"],