Commit Graph

256 Commits

Author SHA1 Message Date
Tabby Cromarty
6e97f54767 Stick to using static ICU for CI builds for compatibility 2025-10-30 15:07:57 +00:00
Tabby Cromarty
82c3801f49 Add curl, icu, onnx and vulkan apt dependencies 2025-10-30 15:07:57 +00:00
Tabby Cromarty
748a1f4fc5 Use system ICU and curl by default on Linux 2025-10-30 15:04:12 +00:00
Tabitha Cromarty
eccea49d99 Require OpenBLAS on Linux so that CT2 works (and enable it for Whisper too) (#251)
* Enable some CT2 backends on Linux

* Might as well enable OpenBLAS for whisper too

* Format cmake files

* Update README to add info about OpenBLAS now being a required dependency

* Fix OpenBLAS dependencies and linking for Ubuntu package
2025-10-30 14:49:12 +00:00
Tabby Cromarty
98c1a8a172 Bump version to 0.4.3 for release 0.4.3 2025-10-29 23:50:44 +00:00
Tabitha Cromarty
124050bdec Downgrade ONNX runtime to 1.20.1 for MacOS 12 compatibility (#249)
* Downgrade ONNX runtime to 1.20.1 for MacOS 12 compatibility

Later versions than this removed support for MacOS 12, but as we support the same MacOS versions as OBS which supports
MacOS 12, we want to keep supporting it too.

Also bump the minimum required version when using a system installed ONNX runtime, for consistency.

Fixes: #248

* Fix CMake formatting

* Remove ONNX error codes added in later versions of the lib
2025-10-29 20:18:53 +00:00
Tabby Cromarty
28b5b7990f Update versions for 0.4.2 release 0.4.2 2025-10-27 19:31:17 +00:00
Tabitha Cromarty
958c40e137 Fix missing Silero VAD model file on Windows (#247)
Revert changes to Windows CMake helpers from #231

I missed that I'd broken the copying of data files to the correct dir for Windows when trying to fix the builds for OBS v32
2025-10-27 19:30:36 +00:00
Tabby Cromarty
5c212e89cd Log GGML abort function calls at debug level 2025-10-27 19:03:00 +00:00
Tabitha Cromarty
0f77a8f07c Add ggml_abort callback function to handle errors (#244)
Apparently whisper.cpp has the ability to set a callback function that is called when there's an error in the GGML
processing. It's poorly (not at all) documented, and seems to take a string argument, though the parameter is always
`null` when it's been called, but having it set seems to prevent some crashes... somehow?? I guess it expects there to
be one, so if there isn't we get a null pointer exception
2025-10-27 15:18:44 +00:00
Ruwen Hahn
3ea321f8b7 Add support for hevc and av1 to WebVTT-in-video-stream (#204)
* Squashed 'deps/c-webvtt-in-video-stream/' changes from 5579ca6..3d44cbd

3d44cbd Add h265 support
7f96bcf Extract various bits of h264 functionality to prepare for h265 support
698793a Prepare `h264::NalUnitWrite` for reuse with h265

git-subtree-dir: deps/c-webvtt-in-video-stream
git-subtree-split: 3d44cbd5039e3ea247972f44f73a66e08cea6e71

* Add h265 support

* Squashed 'deps/c-webvtt-in-video-stream/' changes from 3d44cbd5..d599f6f0

d599f6f0 Add av1 support
11693f6a Extract header writing semantics
e7eb1894 Convert h264/h265 header writing to bitwriters

git-subtree-dir: deps/c-webvtt-in-video-stream
git-subtree-split: d599f6f0142e24ba9a7daeee252da9f055aa39c4

* Add av1 support

* Fix subtitle track name lookup
2025-10-20 14:09:40 +01:00
Tabby Cromarty
abd30c044f Fix endian.h include for MacOS 0.4.1 2025-10-19 19:35:21 +01:00
Tabby Cromarty
3bb873391b Took away too many headers v.v 2025-10-19 19:00:25 +01:00
Tabby Cromarty
8022788e55 Format files 2025-10-19 18:51:10 +01:00
Tabby Cromarty
20c41ce3b9 Remove unused headers 2025-10-19 18:49:50 +01:00
Tabby Cromarty
f88080ae3e Use Stephan Brumme's portable SHA256 library
MacOS doesn't have openssl by default so use a portable SHA256 library with no dependencies

From https://create.stephan-brumme.com/hash-library/
2025-10-19 18:44:25 +01:00
Tabby Cromarty
778928d50a Revert "Log warning if AVX2 not detected"
This reverts commit 9ce2321f96.

Needs work to build with prebuild CT2 apparently
2025-10-19 17:52:28 +01:00
Tabby Cromarty
275964efa5 Bump version to 0.4.1 2025-10-19 17:43:17 +01:00
Tabby Cromarty
a0fc2360b6 Update ggerganov model URLs and checksums
Previous URL for many of these is now dead and several of the checksums were missing
2025-10-19 17:42:21 +01:00
Tabby Cromarty
bc9b4f0855 Add hash validation for downloading transcription models 2025-10-19 17:09:48 +01:00
Tabby Cromarty
9ce2321f96 Log warning if AVX2 not detected 2025-10-19 00:05:23 +01:00
Tabby Cromarty
0f1c445154 Add link to correct MSVC runtime to README in case it's missing 2025-10-19 00:04:36 +01:00
Tabby Cromarty
5398d62fb8 Change recently added catch blocks to use const references
It's been a while since I've done much C++ v.v
2025-10-18 21:58:08 +01:00
Tabby Cromarty
d88635e0fe More README fixes for other linux distro build instructions
Add Vulkan headers to dependencies and fix paths in copy steps
2025-10-18 21:36:16 +01:00
Tabitha Cromarty
6a18570eff Fix crash renaming nonexistent output file if no words spoken (#238) 2025-10-18 21:12:35 +01:00
Tabitha Cromarty
9529451970 Fix build with CMake 4 (#237)
* Set `CMAKE_POLICY_VERSION_MINIMUM=3.5` when CMake 4 or greater is being used
* Bump the version of SentencePiece built from source to 0.2.1
* Fix name of cpu_features setting to disable tests and disable tests in CT2, to avoid GTest being built as it has a REALLY old minimum CMake version
2025-10-18 19:32:18 +01:00
Tabby Cromarty
4b6b2d4fb0 Update README for non-ubuntu linux builds
Add system ICU parameter and note about CMake 4
2025-10-18 12:16:34 +01:00
Tabitha Cromarty
529d2d0314 Add option to use system ICU libs (#220)
If ICU is already available on the system there's no point downloading and
building it again. To save time and space, add an option to find and use the
system version of ICU
2025-10-18 10:29:54 +01:00
Tabby Cromarty
a1b3e248a2 Skip notarising MacOS package on release
Apple developer ID has expired and those are spenny
0.4.0
2025-10-18 09:36:55 +01:00
Tabitha Cromarty
6a90c27e6b Fix compatibility with OBS v32 (#231)
Stop using deprecated API functions that were removed in OBS v32 (See: https://github.com/obsproject/obs-studio/pull/12488)
* Use the return value from `obs_scene_add` instead of looking it up after creating it using the deprecated `obs_scene_sceneitem_from_source` function
* Use v2 sceneitem transform API instead of deprecated v1 API
* Change all uses of `circlebuf` to `deque` as it's been renamed in OBS

Additional bug fixes:
* Wait until scenes are loaded to create text source if it's missing. Previously the creation of the text source could fail due to there not being any scenes yet to create it in
* Fix build on MacOS and some Linux distributions
* Catch exceptions thrown by ONNX runtime and log an error instead of crashing

Other changes:
* Update OBS source dependencies
  * OBS: 30.1.2 -> 31.1.1
  * OBS deps: 2024-03-19 -> 2025-07-11
  * Qt6 deps: 2024-03-19 -> 2025-02-04
* Update build files to more closely match the current plugin template repository

Fixes: #230
Fixes: #227
2025-10-17 22:03:16 +01:00
RodriMora
491109d7cc Fixed typo (#186) 2025-02-03 09:09:11 -05:00
Ruwen Hahn
b3be219915 Add WebVTT-in-video-stream support (#196)
* Fix `whisper_buffer` and `resampled_buffer` data race

`media_unpause` was causing `wisper_buffer` to be freed while
`vad_based_segmentation`/`hybrid_vad_segmentation` need that buffer
to not be modified for the duration of those calls

* Slightly improve handling for weird subtitle output filenames

* Squashed 'deps/c-webvtt-in-video-stream/' content from commit 5579ca6

git-subtree-dir: deps/c-webvtt-in-video-stream
git-subtree-split: 5579ca6dc9dcf94e3c14631c6c01b2ee4dfcf005

* Add WIP webvtt sei functionality

* Add webvtt recording/streaming settings

* Make latency_to_video_in_msecs and send_frequency_hz configurable

* Make webvtt languages configurable

* Add translation and main language separately

* Add rust CI integration
2025-02-03 09:06:52 -05:00
Roy Shilkrot
fe9a52157e Update README.md 2025-01-12 12:40:51 -05:00
Roy Shilkrot
bb1db72052 Update version to 0.3.9 in README.md and buildspec.json; add availabl… (#184)
* Update version to 0.3.9 in README.md and buildspec.json; add available versions section for clarity

* Add support for custom API translation provider and update configuration options

* Enable ccache support in CMake build scripts for improved build performance

* Add status message for detected ccache in CMake build scripts
0.3.9
2024-11-25 12:57:08 -05:00
Roy Shilkrot
a32e327477 No VAD segmentation option (#182)
* Add support for disabled VAD mode and enhance CMake configuration

* Enhance VAD processing and transcription filter data structure with additional comments and logic adjustments

* Enhance VAD processing with improved logging, adjust single segment default, and update inference handling

* Refactor whisper parameter handling and enhance utility functions for better clarity and maintainability

* Add whisper parameters group properties and clean up related code

* Add whisper parameters handling and update related files for improved functionality

* Refactor whisper parameter type casting for improved clarity and consistency

* trigger build

* Fix logging message to use the correct variable for saved sentence
2024-11-24 23:28:46 -05:00
Roy Shilkrot
04a6f6a2a1 Add cloud translation support with multiple providers and configurati… (#183)
* Add cloud translation support with multiple providers and configuration options

* Refactor CMakeLists.txt for cloud translation sources formatting

* Add support for translating only full sentences in cloud translation

* Update ICU build configuration and fix header include case sensitivity

* Fix CURL helper function signatures and improve URL encoding

* Fix character type casting in DeepLTranslator for language conversion

* Refactor file saving logic in transcription filter to streamline sentence handling and add support for saving translated sentences

* Add support for Deepl Free API endpoint and enhance cloud translation configuration

* Add ccache detection to ICU build configuration for improved compilation speed

* Enhance ICU build configuration to use ccache as a compiler wrapper for improved performance
2024-11-24 22:11:49 -05:00
Roy Shilkrot
b7ab6a9ed4 Update version to 0.3.8 in README.md and buildspec.json 0.3.8 2024-11-06 10:50:46 -05:00
Roy Shilkrot
b13988d4a2 translations 2024-11-06 09:09:45 -05:00
Roy Shilkrot
f478809f79 Add new Whisper models to models_directory.json and adjust transcription filter properties 2024-10-30 15:48:32 -04:00
Roy Shilkrot
3668195652 Update README.md 2024-10-28 22:08:46 -04:00
Roy Shilkrot
548cb293ee Update prebuilt Whispercpp version to 0.0.7 and change download URL (#180)
* Update prebuilt Whispercpp version to 0.0.7 and change download URL

* Update acceleration options in build scripts
2024-10-25 12:28:50 -04:00
Roy Shilkrot
073dd2a837 Update README.md 2024-10-23 12:24:08 -04:00
Roy Shilkrot
58005da34a enable transcript rename for non-srt files (#179)
* enable transcript rename for non-srt files

* Update transcription-filter-callbacks.cpp

fix edit mistake

* tweak formatting

* Refactor file renaming logic in transcription-filter-callbacks.cpp

* Refactor file renaming logic and handle recording state changes in transcription-filter-callbacks.cpp

* Refactor file renaming logic and handle recording state changes in transcription-filter-callbacks.cpp

---------

Co-authored-by: Stephen <stephen@lenovo-thinkpad.lan>
Co-authored-by: Stephen Schrauger <6665521+schrauger@users.noreply.github.com>
Co-authored-by: schrauger <schrauger@users.noreply.github.com>
2024-10-11 10:48:02 -04:00
Roy Shilkrot
e26819cf9a Update download links and version number in README.md and buildspec.json 0.3.7 2024-10-09 14:44:42 -04:00
Roy Shilkrot
6936293dce Update README.md 2024-10-09 13:00:36 -04:00
Roy Shilkrot
498d0d6f5a refactor: Add download links for different platforms in README.md 2024-10-09 12:57:05 -04:00
Roy Shilkrot
2834ba1bf5 refactor: Enable downloading models directory from GitHub
This commit modifies the `load_models_info` function in `model-infos.cpp` to enable downloading the models directory from GitHub. Previously, the download functionality was commented out, but now it is uncommented to allow for successful downloading of the directory. This change improves the functionality of the code.

Ref: #<issue_number>
2024-10-09 10:47:07 -04:00
Roy Shilkrot
41bd57fd5a refactor: Update translation options in transcription-filter-properties.cpp
Simplify the translation options in the transcription-filter-properties.cpp file by adding a new option "translate_only_full_sentences". This option will be visible only when the "translate_enabled" flag is true and the "is_advanced" flag is set.

Remove unnecessary code in model-infos.cpp

Remove the code that logs a warning message when the "sha256" field is missing or invalid in the model JSON file. This code is no longer needed as it does not affect the functionality of the program.

Comment out download_json_from_github in model-infos.cpp

Comment out the call to the "download_json_from_github" function in the load_models_info() function in model-infos.cpp. This function is currently not working as intended and needs further investigation.
2024-10-09 10:46:46 -04:00
Roy Shilkrot
5670ac94b2 Model directory (#172)
* refactor: Handle file exceptions when writing raw sentence and translations

This commit modifies the code in transcription-filter-callbacks.cpp to handle file exceptions when writing raw sentence and translations to files. It adds exception handling using try-catch blocks to ensure that file operations are properly handled. This change improves the robustness of the code and prevents crashes or unexpected behavior when file operations fail.

* refactor: Update models_info function to use cached models information

The models_info function in model-downloader.cpp has been updated to use a cached version of the models information. This improves performance by avoiding unnecessary file reads and JSON parsing. The function now returns a const reference to the cached models_info map. This change ensures that the models_info function is more efficient and reduces the overhead of loading the models information.

Refactor the code in model-downloader.cpp to use the updated models_info function and remove the unnecessary file read and JSON parsing code.

Closes #123

* refactor: Simplify file handling in transcription-filter-callbacks.cpp

* refactor: Add script to query Hugging Face models and update models_directory.json

This commit adds two new scripts, hugging_face_model_query.py and hugging_face_model_query_all.py, to query Hugging Face models and update the models_directory.json file. The hugging_face_model_query.py script fetches model information from the Hugging Face API and adds new models to the models_directory.json file. The hugging_face_model_query_all.py script fetches a list of models matching a specific search criteria and adds the matching models to the models_directory.json file. These scripts will help keep the models_directory.json file up to date with the latest models available on Hugging Face.

Refactor the file handling in transcription-filter-callbacks.cpp

This commit simplifies the file handling in the transcription-filter-callbacks.cpp file. The changes aim to improve the readability and maintainability of the code by reducing complexity and removing unnecessary code.

Update the models_info function to use cached models information

This commit updates the models_info function to use cached models information instead of fetching it every time the function is called. This change improves the performance of the function by reducing the number of API calls and improves the overall efficiency of the code.

Handle file exceptions when writing raw sentence and translations

This commit adds exception handling code to handle file exceptions when writing raw sentence and translations. The changes ensure that any file-related exceptions are caught and properly handled, preventing the program from crashing or producing incorrect results.

Simplify the Onnxruntime installation in FetchOnnxruntime.cmake

This commit simplifies the Onnxruntime installation process in the FetchOnnxruntime.cmake file. The changes aim to make the installation steps more concise and easier to understand, improving the overall maintainability of the code.

Update the version to 0.3.6 and adjust the website URL

This commit updates the version of the software to 0.3.6 and adjusts the website URL accordingly. The changes ensure that the software is properly versioned and the website URL is up to date.

* refactor: Add ExtraInfo struct to ModelInfo and update models_info function

* refactor: Update model names in models_directory.json and fix URL in transcription-filter.h
2024-10-08 22:41:20 -04:00
Roy Shilkrot
622f0b163e refactor: Simplify Onnxruntime installation in FetchOnnxruntime.cmake 0.3.6 2024-10-01 16:17:14 -04:00