feat(ui): add floating caption window with live transcription
Add a frameless always-on-top caption window wired to the live capture pipeline. Silence-based segmentation gates the audio so the model never sees silence, and the panel background is painted in paintEvent with a configurable opacity instead of a style sheet. 新增悬浮字幕窗(无边框、置顶、可折叠/展开),接入实时采集与流式转写。 分段由静音检测驱动,静音期间不送音频,避免模型对静音产生幻觉。底板 改为在 paintEvent 中绘制,不透明度可调。
This commit is contained in:
1 parent
21d68e2294
commit
4ed4e23282
14 files changed
+803
-259
No files matched your search
+6
-1
@@ -25,10 +25,12 @@ foreach(_p
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
find_package(Qt6 REQUIRED COMPONENTS Core)
|
||||
find_package(Qt6 REQUIRED COMPONENTS Core Widgets)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
|
||||
pkg_check_modules(SAMPLERATE REQUIRED IMPORTED_TARGET samplerate)
|
||||
pkg_check_modules(PULSE REQUIRED IMPORTED_TARGET libpulse)
|
||||
|
||||
@@ -67,12 +69,15 @@ add_executable(live-caption-cli
|
||||
src/qwen3asr.cpp
|
||||
src/streamingasr.cpp
|
||||
src/audio.cpp
|
||||
src/livetranscriber.cpp
|
||||
src/captionwindow.cpp
|
||||
)
|
||||
|
||||
target_include_directories(live-caption-cli PRIVATE src)
|
||||
|
||||
target_link_libraries(live-caption-cli PRIVATE
|
||||
Qt6::Core
|
||||
Qt6::Widgets
|
||||
Threads::Threads
|
||||
PkgConfig::SAMPLERATE
|
||||
PkgConfig::PULSE
|
||||
|
||||
Reference in new issue
Block a user