- Adding speaker identification on transcriptions and video support for transcription viewer, improvements to transcription table and support for over 1000 of worlds languages via MMS models.
+ Adding speaker identification on transcriptions and video support for transcription viewer, improvements to transcription table and support for over 1000 of worlds languages via MMS models as well as separate window to show live transcripts on a projector.
Release details:
- Speaker identification on finished transcripts
- Support for video in transcription viewer
+ - Presentation (projector) window for live transcripts
- Ability to add notes and restart transcriptions in main table
- Adding support for more than 1000 languages via MMS model family when transcribing with Huggingface transcription type
- Adding support for PEFT models when transcribing with Huggingface transcription type
diff --git a/tests/widgets/presentation_window_test.py b/tests/widgets/presentation_window_test.py
new file mode 100644
index 00000000..2e224272
--- /dev/null
+++ b/tests/widgets/presentation_window_test.py
@@ -0,0 +1,324 @@
+import os
+import pytest
+import tempfile
+
+from unittest.mock import patch, MagicMock
+from pytestqt.qtbot import QtBot
+from PyQt6.QtCore import Qt
+from PyQt6.QtGui import QKeyEvent
+
+from buzz.widgets.presentation_window import PresentationWindow
+from buzz.settings.settings import Settings
+from buzz.locale import _
+
+class TestPresentationWindow:
+ def test_should_set_window_title(self, qtbot: QtBot):
+ """Test that the window title is set correctly"""
+ window = PresentationWindow()
+ qtbot.add_widget(window)
+
+ assert _("Live Transcript Presentation") in window.windowTitle()
+ window.close()
+
+ def test_should_have_window_flag(self, qtbot: QtBot):
+ """Test that window has the Window flag set"""
+ window = PresentationWindow()
+ qtbot.add_widget(window)
+
+ assert window.windowFlags() & Qt.WindowType.Window
+ window.close()
+
+ def test_should_have_transcript_display(self, qtbot: QtBot):
+ """Test that the transcript display is created"""
+ window = PresentationWindow()
+ qtbot.add_widget(window)
+
+ assert window.transcript_display is not None
+ assert window.transcript_display.isReadOnly()
+ window.close()
+
+ def test_should_have_translation_display_hidden(self, qtbot: QtBot):
+ """Test that the translation display is created but hidden initially"""
+ window = PresentationWindow()
+ qtbot.add_widget(window)
+
+ assert window.translation_display is not None
+ assert window.translation_display.isReadOnly()
+ assert not window.translation_display.isVisible()
+ window.close()
+
+ def test_should_have_default_size(self, qtbot: QtBot):
+ """Test that the window has default size"""
+ window = PresentationWindow()
+ qtbot.add_widget(window)
+
+ assert window.width() == 800
+ assert window.height() == 600
+ window.close()
+
+
+class TestPresentationWindowUpdateTranscripts:
+ def test_update_transcripts_with_text(self, qtbot: QtBot):
+ """Test updating transcripts with text"""
+ window = PresentationWindow()
+ qtbot.add_widget(window)
+
+ window.update_transcripts("Hello world")
+
+ assert window._current_transcript == "Hello world"
+ assert "Hello world" in window.transcript_display.toHtml()
+ window.close()
+
+ def test_update_transcripts_with_empty_text(self, qtbot: QtBot):
+ """Test that empty text does not update the display"""
+ window = PresentationWindow()
+ qtbot.add_widget(window)
+
+ window.update_transcripts("")
+
+ assert window._current_transcript == ""
+ window.close()
+
+ def test_update_transcripts_escapes_html(self, qtbot: QtBot):
+ """Test that special HTML characters are escaped"""
+ window = PresentationWindow()
+ qtbot.add_widget(window)
+
+ window.update_transcripts("")
+
+ html = window.transcript_display.toHtml()
+ assert "