Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
18 changes: 11 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,8 @@ set(dsnote_lib_sources
${sources_dir}/app_server.cpp
${sources_dir}/fasterwhisper_engine.hpp
${sources_dir}/fasterwhisper_engine.cpp
${sources_dir}/canary_engine.hpp
${sources_dir}/canary_engine.cpp
${sources_dir}/mimic3_engine.hpp
${sources_dir}/mimic3_engine.cpp
${sources_dir}/april_engine.hpp
Expand Down Expand Up @@ -533,17 +535,17 @@ pkg_search_module(pulse REQUIRED libpulse)
list(APPEND deps_libs ${pulse_LIBRARIES})
list(APPEND includes ${pulse_INCLUDE_DIRS})

find_package(Qt5 COMPONENTS Core Network Multimedia Qml Xml Sql Gui Quick DBus LinguistTools REQUIRED)
list(APPEND deps_libs Qt5::Core Qt5::Network Qt5::Multimedia Qt5::Gui Qt5::Quick Qt5::DBus Qt5::Xml)
find_package(Qt6 COMPONENTS Core Network Multimedia Qml Xml Sql Gui Quick DBus LinguistTools REQUIRED)
list(APPEND deps_libs Qt6::Core Qt6::Network Qt6::Multimedia Qt6::Gui Qt6::Quick Qt6::DBus Qt6::Xml)

if(WITH_DESKTOP)
find_package(Qt5 COMPONENTS QuickControls2 Widgets REQUIRED)
list(APPEND deps_libs Qt5::QuickControls2 Qt5::Widgets)
find_package(Qt6 COMPONENTS QuickControls2 Widgets REQUIRED)
list(APPEND deps_libs Qt6::QuickControls2 Qt6::Widgets)

pkg_search_module(wayland REQUIRED wayland-client)
list(APPEND deps_libs ${wayland_LIBRARIES})
list(APPEND includes ${wayland_INCLUDE_DIRS})
include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS})
include_directories(${Qt6Gui_PRIVATE_INCLUDE_DIRS})

if(BUILD_XKBCOMMON)
include(${cmake_path}/xkbcommon.cmake)
Expand All @@ -565,8 +567,10 @@ if(WITH_DESKTOP)
find_package(X11 REQUIRED)
list(APPEND deps_libs X11)

find_package(Qt5 COMPONENTS X11Extras REQUIRED)
list(APPEND deps_libs Qt5::X11Extras)
# Qt6: X11Extras removed, functionality now in QtGui via QNativeInterface
pkg_search_module(xcb REQUIRED xcb)
list(APPEND deps_libs ${xcb_LIBRARIES})
list(APPEND includes ${xcb_INCLUDE_DIRS})

if(BUILD_QHOTKEY)
include(${cmake_path}/qhotkey.cmake)
Expand Down
6 changes: 3 additions & 3 deletions cmake/dbus_api.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ set(dbus_dsnote_interface_file "${PROJECT_BINARY_DIR}/${info_dbus_app_interface}

configure_file(${dbus_dir}/dsnote.xml.in ${dbus_dsnote_interface_file})

find_package(Qt5 COMPONENTS DBus REQUIRED)
find_package(Qt6 COMPONENTS DBus REQUIRED)

unset(qdbusxml2cpp_bin CACHE)
find_program(qdbusxml2cpp_bin qdbusxml2cpp)
find_program(qdbusxml2cpp_bin qdbusxml2cpp HINTS ${Qt6_DIR}/../../../libexec ${Qt6_DIR}/../../../bin)
if(${qdbusxml2cpp_bin} MATCHES "-NOTFOUND$")
find_program(qdbusxml2cpp_bin qdbusxml2cpp-qt5)
find_program(qdbusxml2cpp_bin qdbusxml2cpp-qt6)
if(${qdbusxml2cpp_bin} MATCHES "-NOTFOUND$")
message(FATAL_ERROR "qdbusxml2cpp not found but it is required")
endif()
Expand Down
2 changes: 1 addition & 1 deletion cmake/openblas_pkgconfig.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pkg_search_module(openblas openblas)

if(NOT DEFINED ${openblas_FOUND})
if(NOT openblas_FOUND)
# check without pkg-config
set(BLA_STATIC OFF)
set(BLA_VENDOR "OpenBLAS")
Expand Down
6 changes: 3 additions & 3 deletions cmake/qhotkey.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ ExternalProject_Add(qhotkey
-DCMAKE_INSTALL_LIBDIR=lib
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
-DQT_DEFAULT_MAJOR_VERSION=6
BUILD_ALWAYS False
)

find_package(Qt5 COMPONENTS X11Extras REQUIRED)

list(APPEND deps_libs Qt5::X11Extras "${external_lib_dir}/libqhotkey.a")
# Qt6: X11Extras removed, functionality now in QtGui via QNativeInterface
list(APPEND deps_libs "${external_lib_dir}/libqhotkey.a")
list(APPEND deps qhotkey)
4 changes: 2 additions & 2 deletions cmake/translations.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set(enabled_translations ar ca_ES cs de en es fr fr_CA it nl no pl ru sv sl tr_T
# finished translations
set(enabled_translations ar ca_ES de en es fr fr_CA it nl no pl ru sv sl tr_TR uk zh_CN zh_TW)

find_package(Qt5 COMPONENTS Core LinguistTools)
find_package(Qt6 COMPONENTS Core LinguistTools)

set(ts_files "")
foreach(lang ${enabled_translations})
Expand All @@ -24,6 +24,6 @@ function(ADD_TRANSLATIONS_RESOURCE res_file)
set(${res_file} ${_res_file} PARENT_SCOPE)
endfunction()

qt5_create_translation(qm_files ${CMAKE_SOURCE_DIR}/src ${desktop_dir}/qml ${sfos_dir}/qml ${ts_files})
qt_add_translation(qm_files ${ts_files})

add_translations_resource(translations_res ${qm_files})
39 changes: 31 additions & 8 deletions config/models.json
Original file line number Diff line number Diff line change
Expand Up @@ -35916,14 +35916,37 @@
"engine": "stt_whisper",
"lang_id": "yo"
},
{
"name": "中文 (FasterWhisper)",
"id": "zh_fasterwhisper",
"engine": "stt_fasterwhisper",
"lang_id": "zh"
},
{
"name": "中文 (WhisperCpp)",
{
"name": "中文 (FasterWhisper)",
"id": "zh_fasterwhisper",
"engine": "stt_fasterwhisper",
"lang_id": "zh"
},
{
"name": "Multilingual (Canary 1B v2)",
"model_id": "multilang_canary_1b_v2",
"engine": "stt_canary",
"lang_id": "multilang",
"info": "NVIDIA Canary 1B v2 - 4.89% WER, 5x faster than Whisper (RTFx 630), best accuracy-per-watt",
"options": "ti",
"score": 5,
"features": ["high_quality", "medium_processing", "stt_punctuation"],
"default_for_lang": true,
"hidden": false
},
{
"name": "Multilingual (Canary Qwen 2.5B)",
"model_id": "multilang_canary_qwen",
"engine": "stt_canary",
"lang_id": "multilang",
"info": "NVIDIA Canary Qwen 2.5B - Larger model for maximum accuracy",
"options": "ti",
"score": 4,
"features": ["high_quality", "slow_processing", "stt_punctuation"],
"hidden": false
},
{
"name": "中文 (WhisperCpp)",
"id": "zh_whisper",
"engine": "stt_whisper",
"lang_id": "zh"
Expand Down
10 changes: 5 additions & 5 deletions src/app_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ int app_server::request_another_instance(const cmd::options &options) {
auto model = qdbus_cast<QVariantMap>(
m.template value<QDBusArgument>());
return std::max(model.contains("id")
? model.value("id").toString().size()
? static_cast<int>(model.value("id").toString().size())
: size,
size);
});
Expand Down Expand Up @@ -204,25 +204,25 @@ int app_server::request_another_instance(const cmd::options &options) {
g_max_size =
std::max(g_max_size,
std::max(modelStt.contains("id")
? modelStt.value("id").toString().size()
? static_cast<int>(modelStt.value("id").toString().size())
: 1,
modelTts.contains("id")
? modelTts.value("id").toString().size()
? static_cast<int>(modelTts.value("id").toString().size())
: 1));
print_active_model("STT", g_max_size, modelStt);
print_active_model("TTS", g_max_size, modelTts);
} else if (options.active_model_to_print_role & cmd::role_stt) {
auto modelStt = iface.activeSttModel();
g_max_size = std::max(g_max_size,
modelStt.contains("id")
? modelStt.value("id").toString().size()
? static_cast<int>(modelStt.value("id").toString().size())
: 1);
print_active_model("STT", g_max_size, modelStt);
} else if (options.active_model_to_print_role & cmd::role_tts) {
auto modelTts = iface.activeTtsModel();
g_max_size = std::max(g_max_size,
modelTts.contains("id")
? modelTts.value("id").toString().size()
? static_cast<int>(modelTts.value("id").toString().size())
: 1);
print_active_model("TTS", g_max_size, modelTts);
}
Expand Down
Loading