diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d986833..caf645b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,14 +1,16 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.4.0 + rev: v4.5.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml - id: check-added-large-files - - repo: https://github.com/psf/black - rev: 23.7.0 + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.1.3 hooks: - - id: black - language_version: python3.10 + - id: ruff + args: [ --fix, --exit-non-zero-on-fix ] + + - id: ruff-format diff --git a/Buzz.spec b/Buzz.spec index a79bb51..d87721a 100644 --- a/Buzz.spec +++ b/Buzz.spec @@ -23,10 +23,8 @@ datas += copy_metadata('tokenizers') datas += collect_data_files('transformers', include_py_files=True) datas += collect_data_files('whisper') -datas += [('whisper.dll' if platform.system() == 'Windows' else 'libwhisper.*', '.')] -datas += [(shutil.which('whisper_cpp') if platform.system() == 'Windows' else 'whisper_cpp', '.')] -datas += [('assets/*', 'assets')] -datas += [(file[1], os.path.dirname(file[1])) for file in Tree('./locale', prefix='locale', excludes=['*.po'])] +datas += [(file[1], os.path.dirname(file[1])) for file in + Tree('./locale', prefix='locale', excludes=['*.po'])] datas += [(shutil.which('ffmpeg'), '.')] block_cipher = None diff --git a/Makefile b/Makefile index 09468af..ca762c7 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,6 @@ endif clean: rm -f $(LIBWHISPER) - rm -f whisper_cpp rm -f buzz/whisper_cpp.py rm -rf dist/* || true @@ -66,16 +65,14 @@ else endif endif -$(LIBWHISPER) whisper_cpp: +buzz/$(LIBWHISPER): cmake -S whisper.cpp -B whisper.cpp/build/ $(CMAKE_FLAGS) cmake --build whisper.cpp/build --verbose - cp whisper.cpp/build/bin/Debug/$(LIBWHISPER) . || true - cp whisper.cpp/build/bin/Debug/main whisper_cpp || true - cp whisper.cpp/build/$(LIBWHISPER) . || true - cp whisper.cpp/build/bin/main whisper_cpp || true + cp whisper.cpp/build/bin/Debug/$(LIBWHISPER) buzz || true + cp whisper.cpp/build/$(LIBWHISPER) buzz || true -buzz/whisper_cpp.py: $(LIBWHISPER) - ctypesgen ./whisper.cpp/whisper.h -l$(LIBWHISPER) -o buzz/whisper_cpp.py +buzz/whisper_cpp.py: buzz/$(LIBWHISPER) + cd buzz && ctypesgen ../whisper.cpp/whisper.h -lwhisper -o whisper_cpp.py # Prints all the Mac developer identities used for code signing print_identities_mac: @@ -89,7 +86,7 @@ dmg_mac: --window-pos 200 120 \ --window-size 600 300 \ --icon-size 100 \ - --icon "./assets/buzz.icns" 175 120 \ + --icon "Buzz.app" 175 120 \ --hide-extension "Buzz.app" \ --app-drop-link 425 120 \ --codesign "$$BUZZ_CODESIGN_IDENTITY" \ @@ -108,7 +105,6 @@ zip_mac: codesign_all_mac: dist/Buzz.app codesign --force --options=runtime --sign "$$BUZZ_CODESIGN_IDENTITY" --timestamp dist/Buzz.app/Contents/Resources/ffmpeg - codesign --force --options=runtime --sign "$$BUZZ_CODESIGN_IDENTITY" --timestamp dist/Buzz.app/Contents/Resources/whisper_cpp for i in $$(find dist/Buzz.app/Contents/Resources/torch/bin -name "*" -type f); \ do \ codesign --force --options=runtime --sign "$$BUZZ_CODESIGN_IDENTITY" --timestamp "$$i"; \ diff --git a/README.md b/README.md index 06bfe42..cb56d43 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ OpenAI's [Whisper](https://github.com/openai/whisper). Download on the Mac App Store -![Buzz](./assets/buzz-banner.jpg) +![Buzz](./buzz/assets/buzz-banner.jpg) ## Installation diff --git a/buzz/assets.py b/buzz/assets.py index 05fcf91..0179ccb 100644 --- a/buzz/assets.py +++ b/buzz/assets.py @@ -4,5 +4,5 @@ import sys def get_asset_path(path: str): if getattr(sys, "frozen", False): - return os.path.join(os.path.dirname(sys.executable), path) - return os.path.join(os.path.dirname(__file__), "..", path) + return os.path.join(os.path.dirname(sys.executable), "buzz", path) + return os.path.join(os.path.dirname(__file__), path) diff --git a/assets/add_FILL0_wght700_GRAD0_opsz48.svg b/buzz/assets/add_FILL0_wght700_GRAD0_opsz48.svg similarity index 85% rename from assets/add_FILL0_wght700_GRAD0_opsz48.svg rename to buzz/assets/add_FILL0_wght700_GRAD0_opsz48.svg index 89c569d..b85dda7 100644 --- a/assets/add_FILL0_wght700_GRAD0_opsz48.svg +++ b/buzz/assets/add_FILL0_wght700_GRAD0_opsz48.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/assets/buzz-banner.jpg b/buzz/assets/buzz-banner.jpg similarity index 100% rename from assets/buzz-banner.jpg rename to buzz/assets/buzz-banner.jpg diff --git a/assets/buzz-icon-1024.png b/buzz/assets/buzz-icon-1024.png similarity index 100% rename from assets/buzz-icon-1024.png rename to buzz/assets/buzz-icon-1024.png diff --git a/buzz/assets/buzz.icns b/buzz/assets/buzz.icns new file mode 100644 index 0000000..06514e9 Binary files /dev/null and b/buzz/assets/buzz.icns differ diff --git a/buzz/assets/buzz.ico b/buzz/assets/buzz.ico new file mode 100644 index 0000000..ece1e74 Binary files /dev/null and b/buzz/assets/buzz.ico differ diff --git a/assets/buzz.png b/buzz/assets/buzz.png similarity index 100% rename from assets/buzz.png rename to buzz/assets/buzz.png diff --git a/assets/buzz.svg b/buzz/assets/buzz.svg similarity index 100% rename from assets/buzz.svg rename to buzz/assets/buzz.svg diff --git a/assets/cancel_FILL0_wght700_GRAD0_opsz48.svg b/buzz/assets/cancel_FILL0_wght700_GRAD0_opsz48.svg similarity index 92% rename from assets/cancel_FILL0_wght700_GRAD0_opsz48.svg rename to buzz/assets/cancel_FILL0_wght700_GRAD0_opsz48.svg index 339d2bd..4dbdda7 100644 --- a/assets/cancel_FILL0_wght700_GRAD0_opsz48.svg +++ b/buzz/assets/cancel_FILL0_wght700_GRAD0_opsz48.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/assets/delete_FILL0_wght700_GRAD0_opsz48.svg b/buzz/assets/delete_FILL0_wght700_GRAD0_opsz48.svg similarity index 84% rename from assets/delete_FILL0_wght700_GRAD0_opsz48.svg rename to buzz/assets/delete_FILL0_wght700_GRAD0_opsz48.svg index 26a6dbb..2b8e678 100644 --- a/assets/delete_FILL0_wght700_GRAD0_opsz48.svg +++ b/buzz/assets/delete_FILL0_wght700_GRAD0_opsz48.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/assets/file_download_black_24dp.svg b/buzz/assets/file_download_black_24dp.svg similarity index 100% rename from assets/file_download_black_24dp.svg rename to buzz/assets/file_download_black_24dp.svg diff --git a/assets/mic_FILL0_wght700_GRAD0_opsz48.svg b/buzz/assets/mic_FILL0_wght700_GRAD0_opsz48.svg similarity index 93% rename from assets/mic_FILL0_wght700_GRAD0_opsz48.svg rename to buzz/assets/mic_FILL0_wght700_GRAD0_opsz48.svg index 4c7dc14..1c4f8af 100644 --- a/assets/mic_FILL0_wght700_GRAD0_opsz48.svg +++ b/buzz/assets/mic_FILL0_wght700_GRAD0_opsz48.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/assets/open_in_full_FILL0_wght700_GRAD0_opsz48.svg b/buzz/assets/open_in_full_FILL0_wght700_GRAD0_opsz48.svg similarity index 75% rename from assets/open_in_full_FILL0_wght700_GRAD0_opsz48.svg rename to buzz/assets/open_in_full_FILL0_wght700_GRAD0_opsz48.svg index a80c444..a73936f 100644 --- a/assets/open_in_full_FILL0_wght700_GRAD0_opsz48.svg +++ b/buzz/assets/open_in_full_FILL0_wght700_GRAD0_opsz48.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/assets/pause_black_24dp.svg b/buzz/assets/pause_black_24dp.svg similarity index 67% rename from assets/pause_black_24dp.svg rename to buzz/assets/pause_black_24dp.svg index 4104cb0..05913cd 100644 --- a/assets/pause_black_24dp.svg +++ b/buzz/assets/pause_black_24dp.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/assets/play_arrow_black_24dp.svg b/buzz/assets/play_arrow_black_24dp.svg similarity index 74% rename from assets/play_arrow_black_24dp.svg rename to buzz/assets/play_arrow_black_24dp.svg index 178bd3a..6134c50 100644 --- a/assets/play_arrow_black_24dp.svg +++ b/buzz/assets/play_arrow_black_24dp.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/assets/redo_FILL0_wght700_GRAD0_opsz48.svg b/buzz/assets/redo_FILL0_wght700_GRAD0_opsz48.svg similarity index 94% rename from assets/redo_FILL0_wght700_GRAD0_opsz48.svg rename to buzz/assets/redo_FILL0_wght700_GRAD0_opsz48.svg index 177fc7b..92a79fc 100644 --- a/assets/redo_FILL0_wght700_GRAD0_opsz48.svg +++ b/buzz/assets/redo_FILL0_wght700_GRAD0_opsz48.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/assets/undo_FILL0_wght700_GRAD0_opsz48.svg b/buzz/assets/undo_FILL0_wght700_GRAD0_opsz48.svg similarity index 95% rename from assets/undo_FILL0_wght700_GRAD0_opsz48.svg rename to buzz/assets/undo_FILL0_wght700_GRAD0_opsz48.svg index 3c17652..2f49584 100644 --- a/assets/undo_FILL0_wght700_GRAD0_opsz48.svg +++ b/buzz/assets/undo_FILL0_wght700_GRAD0_opsz48.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/assets/visibility_FILL0_wght700_GRAD0_opsz48.svg b/buzz/assets/visibility_FILL0_wght700_GRAD0_opsz48.svg similarity index 99% rename from assets/visibility_FILL0_wght700_GRAD0_opsz48.svg rename to buzz/assets/visibility_FILL0_wght700_GRAD0_opsz48.svg index a1fb213..eeb6692 100644 --- a/assets/visibility_FILL0_wght700_GRAD0_opsz48.svg +++ b/buzz/assets/visibility_FILL0_wght700_GRAD0_opsz48.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/assets/visibility_off_FILL0_wght700_GRAD0_opsz48.svg b/buzz/assets/visibility_off_FILL0_wght700_GRAD0_opsz48.svg similarity index 90% rename from assets/visibility_off_FILL0_wght700_GRAD0_opsz48.svg rename to buzz/assets/visibility_off_FILL0_wght700_GRAD0_opsz48.svg index 10974a1..3f00878 100644 --- a/assets/visibility_off_FILL0_wght700_GRAD0_opsz48.svg +++ b/buzz/assets/visibility_off_FILL0_wght700_GRAD0_opsz48.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/buzz/buzz.py b/buzz/buzz.py index b832812..f2a18c4 100644 --- a/buzz/buzz.py +++ b/buzz/buzz.py @@ -6,7 +6,6 @@ import platform import sys from typing import TextIO -from PyQt6.QtCore import QLocale from appdirs import user_log_dir # Check for segfaults if not running in frozen mode diff --git a/poetry.lock b/poetry.lock index fc4b74d..c5c7a86 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,10 +1,9 @@ -# This file is automatically @generated by Poetry 1.4.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. [[package]] name = "aiohttp" version = "3.8.4" description = "Async http client/server framework (asyncio)" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -113,7 +112,6 @@ speedups = ["Brotli", "aiodns", "cchardet"] name = "aiosignal" version = "1.3.1" description = "aiosignal: a list of registered asynchronous callbacks" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -128,7 +126,6 @@ frozenlist = ">=1.1.0" name = "altgraph" version = "0.17.3" description = "Python graph (network) package" -category = "dev" optional = false python-versions = "*" files = [ @@ -140,7 +137,6 @@ files = [ name = "appdirs" version = "1.4.4" description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -category = "main" optional = false python-versions = "*" files = [ @@ -152,7 +148,6 @@ files = [ name = "astroid" version = "2.15.5" description = "An abstract syntax tree for Python with inference support." -category = "dev" optional = false python-versions = ">=3.7.2" files = [ @@ -169,7 +164,6 @@ wrapt = {version = ">=1.11,<2", markers = "python_version < \"3.11\""} name = "async-timeout" version = "4.0.2" description = "Timeout context manager for asyncio programs" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -181,7 +175,6 @@ files = [ name = "attrs" version = "23.1.0" description = "Classes Without Boilerplate" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -200,7 +193,6 @@ tests-no-zope = ["cloudpickle", "hypothesis", "mypy (>=1.1.1)", "pympler", "pyte name = "autopep8" version = "1.7.0" description = "A tool that automatically formats Python code to conform to the PEP 8 style guide" -category = "dev" optional = false python-versions = "*" files = [ @@ -216,7 +208,6 @@ toml = "*" name = "av" version = "10.0.0" description = "Pythonic bindings for FFmpeg's libraries." -category = "main" optional = false python-versions = "*" files = [ @@ -266,59 +257,10 @@ files = [ {file = "av-10.0.0.tar.gz", hash = "sha256:8afd3d5610e1086f3b2d8389d66672ea78624516912c93612de64dcaa4c67e05"}, ] -[[package]] -name = "black" -version = "23.7.0" -description = "The uncompromising code formatter." -category = "dev" -optional = false -python-versions = ">=3.8" -files = [ - {file = "black-23.7.0-cp310-cp310-macosx_10_16_arm64.whl", hash = "sha256:5c4bc552ab52f6c1c506ccae05681fab58c3f72d59ae6e6639e8885e94fe2587"}, - {file = "black-23.7.0-cp310-cp310-macosx_10_16_universal2.whl", hash = "sha256:552513d5cd5694590d7ef6f46e1767a4df9af168d449ff767b13b084c020e63f"}, - {file = "black-23.7.0-cp310-cp310-macosx_10_16_x86_64.whl", hash = "sha256:86cee259349b4448adb4ef9b204bb4467aae74a386bce85d56ba4f5dc0da27be"}, - {file = "black-23.7.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:501387a9edcb75d7ae8a4412bb8749900386eaef258f1aefab18adddea1936bc"}, - {file = "black-23.7.0-cp310-cp310-win_amd64.whl", hash = "sha256:fb074d8b213749fa1d077d630db0d5f8cc3b2ae63587ad4116e8a436e9bbe995"}, - {file = "black-23.7.0-cp311-cp311-macosx_10_16_arm64.whl", hash = "sha256:b5b0ee6d96b345a8b420100b7d71ebfdd19fab5e8301aff48ec270042cd40ac2"}, - {file = "black-23.7.0-cp311-cp311-macosx_10_16_universal2.whl", hash = "sha256:893695a76b140881531062d48476ebe4a48f5d1e9388177e175d76234ca247cd"}, - {file = "black-23.7.0-cp311-cp311-macosx_10_16_x86_64.whl", hash = "sha256:c333286dc3ddca6fdff74670b911cccedacb4ef0a60b34e491b8a67c833b343a"}, - {file = "black-23.7.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:831d8f54c3a8c8cf55f64d0422ee875eecac26f5f649fb6c1df65316b67c8926"}, - {file = "black-23.7.0-cp311-cp311-win_amd64.whl", hash = "sha256:7f3bf2dec7d541b4619b8ce526bda74a6b0bffc480a163fed32eb8b3c9aed8ad"}, - {file = "black-23.7.0-cp38-cp38-macosx_10_16_arm64.whl", hash = "sha256:f9062af71c59c004cd519e2fb8f5d25d39e46d3af011b41ab43b9c74e27e236f"}, - {file = "black-23.7.0-cp38-cp38-macosx_10_16_universal2.whl", hash = "sha256:01ede61aac8c154b55f35301fac3e730baf0c9cf8120f65a9cd61a81cfb4a0c3"}, - {file = "black-23.7.0-cp38-cp38-macosx_10_16_x86_64.whl", hash = "sha256:327a8c2550ddc573b51e2c352adb88143464bb9d92c10416feb86b0f5aee5ff6"}, - {file = "black-23.7.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d1c6022b86f83b632d06f2b02774134def5d4d4f1dac8bef16d90cda18ba28a"}, - {file = "black-23.7.0-cp38-cp38-win_amd64.whl", hash = "sha256:27eb7a0c71604d5de083757fbdb245b1a4fae60e9596514c6ec497eb63f95320"}, - {file = "black-23.7.0-cp39-cp39-macosx_10_16_arm64.whl", hash = "sha256:8417dbd2f57b5701492cd46edcecc4f9208dc75529bcf76c514864e48da867d9"}, - {file = "black-23.7.0-cp39-cp39-macosx_10_16_universal2.whl", hash = "sha256:47e56d83aad53ca140da0af87678fb38e44fd6bc0af71eebab2d1f59b1acf1d3"}, - {file = "black-23.7.0-cp39-cp39-macosx_10_16_x86_64.whl", hash = "sha256:25cc308838fe71f7065df53aedd20327969d05671bac95b38fdf37ebe70ac087"}, - {file = "black-23.7.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:642496b675095d423f9b8448243336f8ec71c9d4d57ec17bf795b67f08132a91"}, - {file = "black-23.7.0-cp39-cp39-win_amd64.whl", hash = "sha256:ad0014efc7acf0bd745792bd0d8857413652979200ab924fbf239062adc12491"}, - {file = "black-23.7.0-py3-none-any.whl", hash = "sha256:9fd59d418c60c0348505f2ddf9609c1e1de8e7493eab96198fc89d9f865e7a96"}, - {file = "black-23.7.0.tar.gz", hash = "sha256:022a582720b0d9480ed82576c920a8c1dde97cc38ff11d8d8859b3bd6ca9eedb"}, -] - -[package.dependencies] -aiohttp = {version = ">=3.7.4", optional = true, markers = "extra == \"d\""} -click = ">=8.0.0" -mypy-extensions = ">=0.4.3" -packaging = ">=22.0" -pathspec = ">=0.9.0" -platformdirs = ">=2" -tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} -typing-extensions = {version = ">=3.10.0.0", markers = "python_version < \"3.10\""} - -[package.extras] -colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.7.4)"] -jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] -uvloop = ["uvloop (>=0.15.2)"] - [[package]] name = "certifi" version = "2023.5.7" description = "Python package for providing Mozilla's CA Bundle." -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -330,7 +272,6 @@ files = [ name = "cffi" version = "1.15.1" description = "Foreign Function Interface for Python calling C code." -category = "main" optional = false python-versions = "*" files = [ @@ -407,7 +348,6 @@ pycparser = "*" name = "cfgv" version = "3.3.1" description = "Validate configuration and produce human readable error messages." -category = "dev" optional = false python-versions = ">=3.6.1" files = [ @@ -419,7 +359,6 @@ files = [ name = "charset-normalizer" version = "3.1.0" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -category = "main" optional = false python-versions = ">=3.7.0" files = [ @@ -500,26 +439,10 @@ files = [ {file = "charset_normalizer-3.1.0-py3-none-any.whl", hash = "sha256:3d9098b479e78c85080c98e1e35ff40b4a31d8953102bb0fd7d1b6f8a2111a3d"}, ] -[[package]] -name = "click" -version = "8.1.7" -description = "Composable command line interface toolkit" -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, - {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"}, -] - -[package.dependencies] -colorama = {version = "*", markers = "platform_system == \"Windows\""} - [[package]] name = "cmake" version = "3.26.4" description = "CMake is an open-source, cross-platform family of tools designed to build, test and package software" -category = "dev" optional = false python-versions = "*" files = [ @@ -549,7 +472,6 @@ test = ["coverage (>=4.2)", "flake8 (>=3.0.4)", "path.py (>=11.5.0)", "pytest (> name = "colorama" version = "0.4.6" description = "Cross-platform colored terminal text." -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ @@ -561,7 +483,6 @@ files = [ name = "coloredlogs" version = "15.0.1" description = "Colored terminal output for Python's logging module" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ @@ -579,7 +500,6 @@ cron = ["capturer (>=2.4)"] name = "coverage" version = "7.2.7" description = "Code coverage measurement for Python" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -655,7 +575,6 @@ toml = ["tomli"] name = "cryptography" version = "41.0.1" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -697,7 +616,6 @@ test-randomorder = ["pytest-randomly"] name = "ctranslate2" version = "3.16.0" description = "Fast inference engine for Transformer models" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -735,7 +653,6 @@ pyyaml = ">=5.3,<7" name = "ctypesgen" version = "1.1.1" description = "Python wrapper generator for ctypes" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -747,7 +664,6 @@ files = [ name = "dataclasses-json" version = "0.5.9" description = "Easily serialize dataclasses to and from JSON" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -767,7 +683,6 @@ dev = ["flake8", "hypothesis", "ipython", "mypy (>=0.710)", "portray", "pytest ( name = "dill" version = "0.3.6" description = "serialize all of python" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -782,7 +697,6 @@ graph = ["objgraph (>=1.7.2)"] name = "distlib" version = "0.3.6" description = "Distribution utilities" -category = "dev" optional = false python-versions = "*" files = [ @@ -794,7 +708,6 @@ files = [ name = "exceptiongroup" version = "1.1.1" description = "Backport of PEP 654 (exception groups)" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -809,7 +722,6 @@ test = ["pytest (>=6)"] name = "faster-whisper" version = "0.4.1" description = "Faster Whisper transcription with CTranslate2" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -818,21 +730,20 @@ files = [ ] [package.dependencies] -av = ">=10.0.0,<11.0.0" +av = "==10.*" ctranslate2 = ">=3.10,<4" huggingface-hub = ">=0.13" -onnxruntime = {version = ">=1.14.0,<1.15.0", markers = "python_version < \"3.11\""} -tokenizers = ">=0.13.0,<0.14.0" +onnxruntime = {version = "==1.14.*", markers = "python_version < \"3.11\""} +tokenizers = "==0.13.*" [package.extras] conversion = ["transformers[torch] (>=4.23)"] -dev = ["black (>=23.0.0,<24.0.0)", "flake8 (>=6.0.0,<7.0.0)", "isort (>=5.0.0,<6.0.0)", "pytest (>=7.0.0,<8.0.0)"] +dev = ["black (==23.*)", "flake8 (==6.*)", "isort (==5.*)", "pytest (==7.*)"] [[package]] name = "ffmpeg-python" version = "0.2.0" description = "Python bindings for FFmpeg - with complex filtering support" -category = "main" optional = false python-versions = "*" files = [ @@ -850,7 +761,6 @@ dev = ["Sphinx (==2.1.0)", "future (==0.17.1)", "numpy (==1.16.4)", "pytest (==4 name = "filelock" version = "3.12.2" description = "A platform independent file lock." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -866,7 +776,6 @@ testing = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "diff-cover (>=7.5)", "p name = "flatbuffers" version = "23.5.26" description = "The FlatBuffers serialization format for Python" -category = "main" optional = false python-versions = "*" files = [ @@ -878,7 +787,6 @@ files = [ name = "frozenlist" version = "1.3.3" description = "A list-like structure which implements collections.abc.MutableSequence" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -962,7 +870,6 @@ files = [ name = "fsspec" version = "2023.6.0" description = "File-system specification" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -998,7 +905,6 @@ tqdm = ["tqdm"] name = "future" version = "0.18.3" description = "Clean single-source support for Python 3 and 2" -category = "main" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" files = [ @@ -1009,7 +915,6 @@ files = [ name = "huggingface-hub" version = "0.15.1" description = "Client library to download and publish models, datasets and other repos on the huggingface.co hub" -category = "main" optional = false python-versions = ">=3.7.0" files = [ @@ -1041,7 +946,6 @@ typing = ["types-PyYAML", "types-requests", "types-simplejson", "types-toml", "t name = "humanfriendly" version = "10.0" description = "Human friendly output for text interfaces using Python" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ @@ -1056,7 +960,6 @@ pyreadline3 = {version = "*", markers = "sys_platform == \"win32\" and python_ve name = "humanize" version = "4.6.0" description = "Python humanize utilities" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1071,7 +974,6 @@ tests = ["freezegun", "pytest", "pytest-cov"] name = "identify" version = "2.5.24" description = "File identification library for Python" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1086,7 +988,6 @@ license = ["ukkonen"] name = "idna" version = "3.4" description = "Internationalized Domain Names in Applications (IDNA)" -category = "main" optional = false python-versions = ">=3.5" files = [ @@ -1098,7 +999,6 @@ files = [ name = "importlib-metadata" version = "6.6.0" description = "Read metadata from Python packages" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1118,7 +1018,6 @@ testing = ["flake8 (<5)", "flufl.flake8", "importlib-resources (>=1.3)", "packag name = "iniconfig" version = "2.0.0" description = "brain-dead simple config-ini parsing" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1130,7 +1029,6 @@ files = [ name = "isort" version = "5.12.0" description = "A Python utility / library to sort Python imports." -category = "dev" optional = false python-versions = ">=3.8.0" files = [ @@ -1148,7 +1046,6 @@ requirements-deprecated-finder = ["pip-api", "pipreqs"] name = "jaraco-classes" version = "3.2.3" description = "Utility functions for Python class constructs" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1167,7 +1064,6 @@ testing = ["flake8 (<5)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-chec name = "jeepney" version = "0.8.0" description = "Low-level, pure Python DBus protocol wrapper." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1183,7 +1079,6 @@ trio = ["async_generator", "trio"] name = "keyring" version = "23.13.1" description = "Store and access your passwords safely." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1207,7 +1102,6 @@ testing = ["flake8 (<5)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-chec name = "lazy-object-proxy" version = "1.9.0" description = "A fast and thorough lazy object proxy." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1253,7 +1147,6 @@ files = [ name = "macholib" version = "1.16.2" description = "Mach-O header analysis and editing" -category = "dev" optional = false python-versions = "*" files = [ @@ -1268,7 +1161,6 @@ altgraph = ">=0.17" name = "marshmallow" version = "3.19.0" description = "A lightweight library for converting complex datatypes to and from native Python datatypes." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1289,7 +1181,6 @@ tests = ["pytest", "pytz", "simplejson"] name = "marshmallow-enum" version = "1.5.1" description = "Enum field for Marshmallow" -category = "main" optional = false python-versions = "*" files = [ @@ -1304,7 +1195,6 @@ marshmallow = ">=2.0.0" name = "mccabe" version = "0.7.0" description = "McCabe checker, plugin for flake8" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1316,7 +1206,6 @@ files = [ name = "more-itertools" version = "9.1.0" description = "More routines for operating on iterables, beyond itertools" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1328,7 +1217,6 @@ files = [ name = "mpmath" version = "1.3.0" description = "Python library for arbitrary-precision floating-point arithmetic" -category = "main" optional = false python-versions = "*" files = [ @@ -1346,7 +1234,6 @@ tests = ["pytest (>=4.6)"] name = "multidict" version = "6.0.4" description = "multidict implementation" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1430,7 +1317,6 @@ files = [ name = "mypy-extensions" version = "1.0.0" description = "Type system extensions for programs checked with the mypy type checker." -category = "main" optional = false python-versions = ">=3.5" files = [ @@ -1442,7 +1328,6 @@ files = [ name = "nodeenv" version = "1.8.0" description = "Node.js virtual environment builder" -category = "dev" optional = false python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*" files = [ @@ -1457,7 +1342,6 @@ setuptools = "*" name = "numpy" version = "1.24.3" description = "Fundamental package for array computing in Python" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1495,7 +1379,6 @@ files = [ name = "onnxruntime" version = "1.14.1" description = "ONNX Runtime is a runtime accelerator for Machine Learning models" -category = "main" optional = false python-versions = "*" files = [ @@ -1544,7 +1427,6 @@ sympy = "*" name = "openai" version = "0.27.8" description = "Python client library for the OpenAI API" -category = "main" optional = false python-versions = ">=3.7.1" files = [ @@ -1559,7 +1441,7 @@ tqdm = "*" [package.extras] datalib = ["numpy", "openpyxl (>=3.0.7)", "pandas (>=1.2.3)", "pandas-stubs (>=1.1.0.11)"] -dev = ["black (>=21.6b0,<22.0)", "pytest (>=6.0.0,<7.0.0)", "pytest-asyncio", "pytest-mock"] +dev = ["black (>=21.6b0,<22.0)", "pytest (==6.*)", "pytest-asyncio", "pytest-mock"] embeddings = ["matplotlib", "numpy", "openpyxl (>=3.0.7)", "pandas (>=1.2.3)", "pandas-stubs (>=1.1.0.11)", "plotly", "scikit-learn (>=1.0.2)", "scipy", "tenacity (>=8.0.1)"] wandb = ["numpy", "openpyxl (>=3.0.7)", "pandas (>=1.2.3)", "pandas-stubs (>=1.1.0.11)", "wandb"] @@ -1567,7 +1449,6 @@ wandb = ["numpy", "openpyxl (>=3.0.7)", "pandas (>=1.2.3)", "pandas-stubs (>=1.1 name = "openai-whisper" version = "20230124" description = "Robust Speech Recognition via Large-Scale Weak Supervision" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1589,7 +1470,6 @@ dev = ["pytest"] name = "packaging" version = "23.1" description = "Core utilities for Python packages" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1597,23 +1477,10 @@ files = [ {file = "packaging-23.1.tar.gz", hash = "sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f"}, ] -[[package]] -name = "pathspec" -version = "0.11.2" -description = "Utility library for gitignore style pattern matching of file paths." -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "pathspec-0.11.2-py3-none-any.whl", hash = "sha256:1d6ed233af05e679efb96b1851550ea95bbb64b7c490b0f5aa52996c11e92a20"}, - {file = "pathspec-0.11.2.tar.gz", hash = "sha256:e0d8d0ac2f12da61956eb2306b69f9469b42f4deb0f3cb6ed47b9cce9996ced3"}, -] - [[package]] name = "pefile" version = "2023.2.7" description = "Python PE parsing module" -category = "dev" optional = false python-versions = ">=3.6.0" files = [ @@ -1625,7 +1492,6 @@ files = [ name = "platformdirs" version = "3.5.3" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1641,7 +1507,6 @@ test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.3.1)", "pytest- name = "pluggy" version = "1.0.0" description = "plugin and hook calling mechanisms for python" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1657,7 +1522,6 @@ testing = ["pytest", "pytest-benchmark"] name = "pre-commit" version = "2.21.0" description = "A framework for managing and maintaining multi-language pre-commit hooks." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1676,7 +1540,6 @@ virtualenv = ">=20.10.0" name = "protobuf" version = "4.23.3" description = "" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1699,7 +1562,6 @@ files = [ name = "py-cpuinfo" version = "9.0.0" description = "Get CPU info with pure Python" -category = "dev" optional = false python-versions = "*" files = [ @@ -1711,7 +1573,6 @@ files = [ name = "pycodestyle" version = "2.10.0" description = "Python style guide checker" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1723,7 +1584,6 @@ files = [ name = "pycparser" version = "2.21" description = "C parser in Python" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -1735,7 +1595,6 @@ files = [ name = "pyinstaller" version = "5.12.0" description = "PyInstaller bundles a Python application and all its dependencies into a single package." -category = "dev" optional = false python-versions = "<3.12,>=3.7" files = [ @@ -1769,7 +1628,6 @@ hook-testing = ["execnet (>=1.5.0)", "psutil", "pytest (>=2.7.3)"] name = "pyinstaller-hooks-contrib" version = "2023.3" description = "Community maintained hooks for PyInstaller" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1781,7 +1639,6 @@ files = [ name = "pylint" version = "2.17.4" description = "python code static checker" -category = "dev" optional = false python-versions = ">=3.7.2" files = [ @@ -1808,7 +1665,6 @@ testutils = ["gitpython (>3)"] name = "PyQt6" version = "6.4.0" description = "Python bindings for the Qt cross platform application toolkit" -category = "main" optional = false python-versions = ">=3.6.1" files = [ @@ -1826,7 +1682,6 @@ PyQt6-sip = ">=13.4,<14" name = "PyQt6-Qt6" version = "6.4.1" description = "The subset of a Qt installation needed by PyQt6." -category = "main" optional = false python-versions = "*" files = [ @@ -1840,7 +1695,6 @@ files = [ name = "PyQt6-sip" version = "13.4.0" description = "The sip module support for PyQt6" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1866,7 +1720,6 @@ files = [ name = "pyreadline3" version = "3.4.1" description = "A python implementation of GNU readline." -category = "main" optional = false python-versions = "*" files = [ @@ -1878,7 +1731,6 @@ files = [ name = "pytest" version = "7.3.2" description = "pytest: simple powerful testing with Python" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1901,7 +1753,6 @@ testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "no name = "pytest-benchmark" version = "4.0.0" description = "A ``pytest`` fixture for benchmarking code. It will group the tests into rounds that are calibrated to the chosen timer." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1922,7 +1773,6 @@ histogram = ["pygal", "pygaljs"] name = "pytest-cov" version = "4.1.0" description = "Pytest plugin for measuring coverage." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1941,7 +1791,6 @@ testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtuale name = "pytest-qt" version = "4.2.0" description = "pytest support for PyQt and PySide applications" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1960,7 +1809,6 @@ doc = ["sphinx", "sphinx-rtd-theme"] name = "pytest-xvfb" version = "2.0.0" description = "A pytest plugin to run Xvfb for tests." -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -1976,7 +1824,6 @@ pyvirtualdisplay = ">=1.3" name = "pyvirtualdisplay" version = "3.0" description = "python wrapper for Xvfb, Xephyr and Xvnc" -category = "dev" optional = false python-versions = "*" files = [ @@ -1988,7 +1835,6 @@ files = [ name = "pywin32-ctypes" version = "0.2.0" description = "" -category = "main" optional = false python-versions = "*" files = [ @@ -2000,7 +1846,6 @@ files = [ name = "pyyaml" version = "6.0" description = "YAML parser and emitter for Python" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -2050,7 +1895,6 @@ files = [ name = "regex" version = "2023.6.3" description = "Alternative regular expression module, to replace re." -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -2148,7 +1992,6 @@ files = [ name = "requests" version = "2.31.0" description = "Python HTTP for Humans." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2166,11 +2009,36 @@ urllib3 = ">=1.21.1,<3" socks = ["PySocks (>=1.5.6,!=1.5.7)"] use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] +[[package]] +name = "ruff" +version = "0.1.3" +description = "An extremely fast Python linter, written in Rust." +optional = false +python-versions = ">=3.7" +files = [ + {file = "ruff-0.1.3-py3-none-macosx_10_7_x86_64.whl", hash = "sha256:b46d43d51f7061652eeadb426a9e3caa1e0002470229ab2fc19de8a7b0766901"}, + {file = "ruff-0.1.3-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:b8afeb9abd26b4029c72adc9921b8363374f4e7edb78385ffaa80278313a15f9"}, + {file = "ruff-0.1.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ca3cf365bf32e9ba7e6db3f48a4d3e2c446cd19ebee04f05338bc3910114528b"}, + {file = "ruff-0.1.3-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4874c165f96c14a00590dcc727a04dca0cfd110334c24b039458c06cf78a672e"}, + {file = "ruff-0.1.3-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eec2dd31eed114e48ea42dbffc443e9b7221976554a504767ceaee3dd38edeb8"}, + {file = "ruff-0.1.3-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:dc3ec4edb3b73f21b4aa51337e16674c752f1d76a4a543af56d7d04e97769613"}, + {file = "ruff-0.1.3-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2e3de9ed2e39160800281848ff4670e1698037ca039bda7b9274f849258d26ce"}, + {file = "ruff-0.1.3-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1c595193881922cc0556a90f3af99b1c5681f0c552e7a2a189956141d8666fe8"}, + {file = "ruff-0.1.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0f75e670d529aa2288cd00fc0e9b9287603d95e1536d7a7e0cafe00f75e0dd9d"}, + {file = "ruff-0.1.3-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:76dd49f6cd945d82d9d4a9a6622c54a994689d8d7b22fa1322983389b4892e20"}, + {file = "ruff-0.1.3-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:918b454bc4f8874a616f0d725590277c42949431ceb303950e87fef7a7d94cb3"}, + {file = "ruff-0.1.3-py3-none-musllinux_1_2_i686.whl", hash = "sha256:d8859605e729cd5e53aa38275568dbbdb4fe882d2ea2714c5453b678dca83784"}, + {file = "ruff-0.1.3-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:0b6c55f5ef8d9dd05b230bb6ab80bc4381ecb60ae56db0330f660ea240cb0d4a"}, + {file = "ruff-0.1.3-py3-none-win32.whl", hash = "sha256:3e7afcbdcfbe3399c34e0f6370c30f6e529193c731b885316c5a09c9e4317eef"}, + {file = "ruff-0.1.3-py3-none-win_amd64.whl", hash = "sha256:7a18df6638cec4a5bd75350639b2bb2a2366e01222825562c7346674bdceb7ea"}, + {file = "ruff-0.1.3-py3-none-win_arm64.whl", hash = "sha256:12fd53696c83a194a2db7f9a46337ce06445fb9aa7d25ea6f293cf75b21aca9f"}, + {file = "ruff-0.1.3.tar.gz", hash = "sha256:3ba6145369a151401d5db79f0a47d50e470384d0d89d0d6f7fab0b589ad07c34"}, +] + [[package]] name = "secretstorage" version = "3.3.3" description = "Python bindings to FreeDesktop.org Secret Service API" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -2186,7 +2054,6 @@ jeepney = ">=0.6" name = "setuptools" version = "67.8.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2203,7 +2070,6 @@ testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs ( name = "six" version = "1.16.0" description = "Python 2 and 3 compatibility utilities" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" files = [ @@ -2215,7 +2081,6 @@ files = [ name = "sounddevice" version = "0.4.6" description = "Play and Record Sound with Python" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2236,7 +2101,6 @@ numpy = ["NumPy"] name = "stable-ts" version = "1.0.2" description = "Stabilizing timestamps of OpenAI's Whisper outputs down to word-level." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2250,7 +2114,6 @@ whisper = "*" name = "sympy" version = "1.12" description = "Computer algebra system (CAS) in Python" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -2265,7 +2128,6 @@ mpmath = ">=0.19" name = "tokenizers" version = "0.13.3" description = "Fast and Customizable Tokenizers" -category = "main" optional = false python-versions = "*" files = [ @@ -2320,7 +2182,6 @@ testing = ["black (==22.3)", "datasets", "numpy", "pytest", "requests"] name = "toml" version = "0.10.2" description = "Python Library for Tom's Obvious, Minimal Language" -category = "dev" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" files = [ @@ -2332,7 +2193,6 @@ files = [ name = "tomli" version = "2.0.1" description = "A lil' TOML parser" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2344,7 +2204,6 @@ files = [ name = "tomlkit" version = "0.11.8" description = "Style preserving TOML library" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2356,7 +2215,6 @@ files = [ name = "torch" version = "1.12.1" description = "Tensors and Dynamic neural networks in Python with strong GPU acceleration" -category = "main" optional = false python-versions = ">=3.7.0" files = [ @@ -2389,7 +2247,6 @@ typing-extensions = "*" name = "tqdm" version = "4.65.0" description = "Fast, Extensible Progress Meter" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2410,7 +2267,6 @@ telegram = ["requests"] name = "transformers" version = "4.24.0" description = "State-of-the-art Machine Learning for JAX, PyTorch and TensorFlow" -category = "main" optional = false python-versions = ">=3.7.0" files = [ @@ -2475,7 +2331,6 @@ vision = ["Pillow"] name = "typing-extensions" version = "4.6.3" description = "Backported and Experimental Type Hints for Python 3.7+" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2487,7 +2342,6 @@ files = [ name = "typing-inspect" version = "0.9.0" description = "Runtime inspection utilities for typing module." -category = "main" optional = false python-versions = "*" files = [ @@ -2503,7 +2357,6 @@ typing-extensions = ">=3.7.4" name = "urllib3" version = "2.0.3" description = "HTTP library with thread-safe connection pooling, file post, and more." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2521,7 +2374,6 @@ zstd = ["zstandard (>=0.18.0)"] name = "virtualenv" version = "20.23.0" description = "Virtual Python Environment builder" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2542,7 +2394,6 @@ test = ["covdefaults (>=2.3)", "coverage (>=7.2.3)", "coverage-enable-subprocess name = "whisper" version = "1.1.10" description = "Fixed size round-robin style database" -category = "main" optional = false python-versions = "*" files = [ @@ -2556,7 +2407,6 @@ six = "*" name = "wrapt" version = "1.15.0" description = "Module for decorators, wrappers and monkey patching." -category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" files = [ @@ -2641,7 +2491,6 @@ files = [ name = "yarl" version = "1.9.2" description = "Yet another URL library" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2729,7 +2578,6 @@ multidict = ">=4.0" name = "zipp" version = "3.15.0" description = "Backport of pathlib-compatible object wrapper for zip files" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2744,4 +2592,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more [metadata] lock-version = "2.0" python-versions = ">=3.9.13,<3.11" -content-hash = "fe7fae59602bd0ecdceafbfe274f6f36f0cb489b67bfc7d4bfae4998dbbe672a" +content-hash = "642d5e26340deaf78ae2a52ee332ddfb45cc745c226c18196ca4d6232b243e2c" diff --git a/pyproject.toml b/pyproject.toml index c246cc2..2fb519a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,6 +5,7 @@ description = "" authors = ["Chidi Williams "] license = "MIT" readme = "README.md" +include = ["buzz/libwhisper.*", "buzz/whisper_cpp.py"] [tool.poetry.dependencies] python = ">=3.9.13,<3.11" @@ -33,7 +34,7 @@ pytest-xvfb = "^2.0.0" pylint = "^2.15.5" pre-commit = "^2.20.0" pytest-benchmark = "^4.0.0" -black = {extras = ["d"], version = "^23.7.0"} +ruff = "^0.1.3" [tool.poetry.group.build.dependencies] ctypesgen = "^1.1.1" diff --git a/scripts/bundle_linux.sh b/scripts/bundle_linux.sh index 6158a3b..33c2666 100644 --- a/scripts/bundle_linux.sh +++ b/scripts/bundle_linux.sh @@ -13,7 +13,7 @@ cp -r $PYINSTALLER_BUILD_PATH $PACKAGE_PATH/opt/buzz cp buzz.desktop $PACKAGE_PATH/usr/share/applications # Copy icons -cp assets/buzz.svg $PACKAGE_PATH/usr/share/icons/hicolor/scalable/apps/buzz.svg +cp buzz/assets/buzz.svg $PACKAGE_PATH/usr/share/icons/hicolor/scalable/apps/buzz.svg # Set permissions find $PACKAGE_PATH/opt/buzz -type f -exec chmod 644 -- {} + diff --git a/setup.py b/setup.py deleted file mode 100644 index f466383..0000000 --- a/setup.py +++ /dev/null @@ -1,43 +0,0 @@ -# -*- coding: utf-8 -*- -from setuptools import setup - -packages = ["buzz", "buzz.settings", "buzz.store", "buzz.widgets"] - -package_data = {"": ["*"]} - -install_requires = [ - "PyQt6==6.4.0", - "appdirs>=1.4.4,<2.0.0", - "faster-whisper>=0.4.1,<0.5.0", - "ffmpeg-python>=0.2.0,<0.3.0", - "humanize>=4.4.0,<5.0.0", - "keyring>=23.13.1,<24.0.0", - "openai-whisper==v20230124", - "openai>=0.27.1,<0.28.0", - "platformdirs==3.5.3", - "sounddevice>=0.4.5,<0.5.0", - "stable-ts==1.0.2", - "torch==1.12.1", - "transformers>=4.24.0,<4.25.0", -] - -setup_kwargs = { - "name": "buzz", - "version": "0.8.3", - "description": "", - "long_description": '# Buzz\n\nTranscribe and translate audio offline on your personal computer. Powered by\nOpenAI\'s [Whisper](https://github.com/openai/whisper).\n\n![MIT License](https://img.shields.io/badge/license-MIT-green)\n[![CI](https://github.com/chidiwilliams/buzz/actions/workflows/ci.yml/badge.svg)](https://github.com/chidiwilliams/buzz/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/github/chidiwilliams/buzz/branch/main/graph/badge.svg?token=YJSB8S2VEP)](https://codecov.io/github/chidiwilliams/buzz)\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/chidiwilliams/buzz)\n[![Github all releases](https://img.shields.io/github/downloads/chidiwilliams/buzz/total.svg)](https://GitHub.com/chidiwilliams/buzz/releases/)\n\n
\n

Buzz is better on the App Store. Get a Mac-native version of Buzz with a cleaner look, audio playback, drag-and-drop import, transcript editing, search, and much more.

\nDownload on the Mac App Store\n
\n\n![Buzz](./assets/buzz-banner.jpg)\n\n## Features\n\n- Import audio and video files and export transcripts to TXT, SRT, and\n VTT ([Demo](https://www.loom.com/share/cf263b099ac3481082bb56d19b7c87fe))\n- Transcription and translation from your computer\'s microphones to text (Resource-intensive and may not be\n real-time, [Demo](https://www.loom.com/share/564b753eb4d44b55b985b8abd26b55f7))\n- Supports [Whisper](https://github.com/openai/whisper#available-models-and-languages),\n [Whisper.cpp](https://github.com/ggerganov/whisper.cpp), [Faster Whisper](https://github.com/guillaumekln/faster-whisper),\n [Whisper-compatible Hugging Face models](https://huggingface.co/models?other=whisper), and\n the [OpenAI Whisper API](https://platform.openai.com/docs/api-reference/introduction)\n- [Command-Line Interface](#command-line-interface)\n- Available on Mac, Windows, and Linux\n\n## Installation\n\nTo install Buzz, download the [latest version](https://github.com/chidiwilliams/buzz/releases/latest) for your operating\nsystem. Buzz is available on **Mac** (Intel), **Windows**, and **Linux**. (For Apple Silicon, please see the [App Store version](https://apps.apple.com/us/app/buzz-captions/id6446018936?mt=12&itsct=apps_box_badge&itscg=30200).)\n\n### Mac (Intel, macOS 11.7 and later)\n\n- Install via [brew](https://brew.sh/):\n\n ```shell\n brew install --cask buzz\n ```\n\n Alternatively, download and run the `Buzz-x.y.z.dmg` file.\n\n### Windows (Windows 10 and later)\n\n- Download and run the `Buzz-x.y.z.exe` file.\n\n### Linux (Ubuntu 20.04 and later)\n\n- Install dependencies:\n\n ```shell\n sudo apt-get install libportaudio2\n ```\n\n- Download and extract the `Buzz-x.y.z-unix.tar.gz` file\n\n## How to use\n\n### File import\n\nTo import a file:\n\n- Click Import Media File on the File menu (or the \'+\' icon on the toolbar, or **Command/Ctrl + O**).\n- Choose an audio or video file.\n- Select a task, language, and the model settings.\n- Click Run.\n- When the transcription status shows \'Completed\', double-click on the row (or select the row and click the \'⤢\' icon) to\n open the transcription.\n\n| Field | Options | Default | Description |\n| ------------------ | ------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Export As | "TXT", "SRT", "VTT" | "TXT" | Export file format |\n| Word-Level Timings | Off / On | Off | If checked, the transcription will generate a separate subtitle line for each word in the audio. Enabled only when "Export As" is set to "SRT" or "VTT". |\n\n(See the [Live Recording section](#live-recording) for more information about the task, language, and quality settings.)\n\n[![Media File Import on Buzz](https://cdn.loom.com/sessions/thumbnails/cf263b099ac3481082bb56d19b7c87fe-with-play.gif)](https://www.loom.com/share/cf263b099ac3481082bb56d19b7c87fe "Media File Import on Buzz")\n\n### Live Recording\n\nTo start a live recording:\n\n- Select a recording task, language, quality, and microphone.\n- Click Record.\n\n> **Note:** Transcribing audio using the default Whisper model is resource-intensive. Consider using the Whisper.cpp\n> Tiny model to get real-time performance.\n\n| Field | Options | Default | Description |\n| ---------- | ---------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Task | "Transcribe", "Translate" | "Transcribe" | "Transcribe" converts the input audio into text in the selected language, while "Translate" converts it into text in English. |\n| Language | See [Whisper\'s documentation](https://github.com/openai/whisper#available-models-and-languages) for the full list of supported languages | "Detect Language" | "Detect Language" will try to detect the spoken language in the audio based on the first few seconds. However, selecting a language is recommended (if known) as it will improve transcription quality in many cases. |\n| Quality | "Very Low", "Low", "Medium", "High" | "Very Low" | The transcription quality determines the Whisper model used for transcription. "Very Low" uses the "tiny" model; "Low" uses the "base" model; "Medium" uses the "small" model; and "High" uses the "medium" model. The larger models produce higher-quality transcriptions, but require more system resources. See [Whisper\'s documentation](https://github.com/openai/whisper#available-models-and-languages) for more information about the models. |\n| Microphone | [Available system microphones] | [Default system microphone] | Microphone for recording input audio. |\n\n[![Live Recording on Buzz](https://cdn.loom.com/sessions/thumbnails/564b753eb4d44b55b985b8abd26b55f7-with-play.gif)](https://www.loom.com/share/564b753eb4d44b55b985b8abd26b55f7 "Live Recording on Buzz")\n\n### Record audio playing from computer\n\nTo record audio playing from an application on your computer, you may install an audio loopback driver (a program that\nlets you create virtual audio devices). The rest of this guide will\nuse [BlackHole](https://github.com/ExistentialAudio/BlackHole) on Mac, but you can use other alternatives for your\noperating system (\nsee [LoopBeAudio](https://nerds.de/en/loopbeaudio.html), [LoopBack](https://rogueamoeba.com/loopback/),\nand [Virtual Audio Cable](https://vac.muzychenko.net/en/)).\n\n1. Install [BlackHole via Homebrew](https://github.com/ExistentialAudio/BlackHole#option-2-install-via-homebrew)\n\n ```shell\n brew install blackhole-2ch\n ```\n\n2. Open Audio MIDI Setup from Spotlight or from `/Applications/Utilities/Audio Midi Setup.app`.\n\n ![Open Audio MIDI Setup from Spotlight](https://existential.audio/howto/img/spotlight.png)\n\n3. Click the \'+\' icon at the lower left corner and select \'Create Multi-Output Device\'.\n\n ![Create multi-output device](https://existential.audio/howto/img/createmulti-output.png)\n\n4. Add your default speaker and BlackHole to the multi-output device.\n\n ![Screenshot of multi-output device](https://existential.audio/howto/img/multi-output.png)\n\n5. Select this multi-output device as your speaker (application or system-wide) to play audio into BlackHole.\n\n6. Open Buzz, select BlackHole as your microphone, and record as before to see transcriptions from the audio playing\n through BlackHole.\n\n## Command-Line Interface\n\n### `add`\n\nStart a new transcription task\n\nExamples:\n\n```shell\n# Translate two MP3 files from French to English using OpenAI Whisper API\nbuzz add --task translate --language fr --model-type openaiapi /Users/user/Downloads/1b3b03e4-8db5-ea2c-ace5-b71ff32e3304.mp3 /Users/user/Downloads/koaf9083k1lkpsfdi0.mp3\n\n# Transcribe an MP4 using Whisper.cpp "small" model and immediately export to SRT and VTT files\nbuzz add --task transcribe --model-type whispercpp --model-size small --prompt "My initial prompt" --srt --vtt /Users/user/Downloads/buzz/1b3b03e4-8db5-ea2c-ace5-b71ff32e3304.mp4\n```\n\nRun `buzz add --help` to see all available options.\n\n## Build\n\nTo build/run Buzz locally from source, first install the requirements:\n\n1. [Poetry](https://python-poetry.org/docs/#installing-with-the-official-installer)\n\nThen:\n\n1. Clone the repository\n\n ```shell\n git clone --recurse-submodules https://github.com/chidiwilliams/buzz\n ```\n\n2. Install the project dependencies.\n\n ```shell\n poetry install\n ```\n\n3. (Optional) To use Whisper.cpp inference, run:\n\n ```shell\n make buzz/whisper_cpp.py\n ```\n\n4. (Optional) To compile the translations, run:\n\n ```shell\n make translation_mo\n ```\n\n5. Finally, run the app with:\n\n ```shell\n poetry run python main.py\n ```\n\n Or build with:\n\n ```shell\n poetry run pyinstaller --noconfirm Buzz.spec\n ```\n\n## FAQ\n\n1. **Where are the models stored?**\n\n The Whisper models are stored in `~/.cache/whisper`. The Whisper.cpp models are stored in `~/Library/Caches/Buzz` (\n Mac OS), `~/.cache/Buzz` (Unix), or `C:\\Users\\\\AppData\\Local\\Buzz\\Buzz\\Cache` (Windows). The Hugging Face\n models are stored in `~/.cache/huggingface/hub`.\n\n2. **What can I try if the transcription runs too slowly?**\n\n Try using a lower Whisper model size or using a Whisper.cpp model.\n\n## Credits\n\n- SVG Icons: [Google Fonts Material Symbols](https://fonts.google.com/icons)\n', - "author": "Chidi Williams", - "author_email": "williamschidi1@gmail.com", - "maintainer": "None", - "maintainer_email": "None", - "url": "None", - "packages": packages, - "package_data": package_data, - "install_requires": install_requires, - "python_requires": ">=3.9.13,<3.11", -} -from build import * - -build(setup_kwargs) - -setup(**setup_kwargs) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index c1429dc..9037cb0 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -13,7 +13,7 @@ description: | grade: stable confinement: strict license: MIT -icon: assets/buzz.svg +icon: buzz/assets/buzz.svg architectures: - build-on: amd64 diff --git a/tests/widgets/main_window_test.py b/tests/widgets/main_window_test.py index e05f026..6a3fa96 100644 --- a/tests/widgets/main_window_test.py +++ b/tests/widgets/main_window_test.py @@ -59,10 +59,8 @@ class TestMainWindow: assert window.windowIcon().pixmap(QSize(64, 64)).isNull() is False window.close() - # @pytest.mark.skip(reason='Timing out or crashing') def test_should_run_transcription_task(self, qtbot: QtBot, tasks_cache): window = MainWindow(tasks_cache=tasks_cache) - qtbot.add_widget(window) self._start_new_transcription(window) @@ -79,6 +77,7 @@ class TestMainWindow: table_widget.indexFromItem(table_widget.item(0, 1)) ) assert open_transcript_action.isEnabled() + window.close() # @pytest.mark.skip(reason='Timing out or crashing') def test_should_run_and_cancel_transcription_task(self, qtbot, tasks_cache):