whisper-gui 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ # Auto detect text files and perform LF normalization
2
+ * text=auto
@@ -0,0 +1,71 @@
1
+ # This workflow will upload a Python Package to PyPI when a release is created
2
+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3
+
4
+ # This workflow uses actions that are not certified by GitHub.
5
+ # They are provided by a third-party and are governed by
6
+ # separate terms of service, privacy policy, and support
7
+ # documentation.
8
+
9
+ name: Upload Python Package
10
+
11
+ on:
12
+ release:
13
+ types: [published]
14
+ workflow_dispatch:
15
+
16
+ permissions:
17
+ contents: read
18
+
19
+ jobs:
20
+ release-build:
21
+ runs-on: ubuntu-latest
22
+
23
+ steps:
24
+ - uses: actions/checkout@v4
25
+
26
+ - uses: actions/setup-python@v5
27
+ with:
28
+ python-version: "3.x"
29
+
30
+ - name: Build release distributions
31
+ run: |
32
+ # NOTE: put your own distribution build steps here.
33
+ python -m pip install build
34
+ python -m build
35
+
36
+ - name: Upload distributions
37
+ uses: actions/upload-artifact@v4
38
+ with:
39
+ name: release-dists
40
+ path: dist/
41
+
42
+ pypi-publish:
43
+ runs-on: ubuntu-latest
44
+ needs:
45
+ - release-build
46
+ permissions:
47
+ # IMPORTANT: this permission is mandatory for trusted publishing
48
+ id-token: write
49
+
50
+ # Dedicated environments with protections for publishing are strongly recommended.
51
+ # For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
52
+ environment:
53
+ name: pypi
54
+ # OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
55
+ # url: https://pypi.org/p/YOURPROJECT
56
+ #
57
+ # ALTERNATIVE: if your GitHub Release name is the PyPI project version string
58
+ # ALTERNATIVE: exactly, uncomment the following line instead:
59
+ # url: https://pypi.org/project/YOURPROJECT/${{ github.event.release.name }}
60
+
61
+ steps:
62
+ - name: Retrieve release distributions
63
+ uses: actions/download-artifact@v4
64
+ with:
65
+ name: release-dists
66
+ path: dist/
67
+
68
+ - name: Publish release distributions to PyPI
69
+ uses: pypa/gh-action-pypi-publish@release/v1
70
+ with:
71
+ packages-dir: dist/
@@ -0,0 +1,164 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # poetry
98
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102
+ #poetry.lock
103
+
104
+ # pdm
105
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106
+ #pdm.lock
107
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108
+ # in version control.
109
+ # https://pdm.fming.dev/#use-with-ide
110
+ .pdm.toml
111
+
112
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113
+ __pypackages__/
114
+
115
+ # Celery stuff
116
+ celerybeat-schedule
117
+ celerybeat.pid
118
+
119
+ # SageMath parsed files
120
+ *.sage.py
121
+
122
+ # Environments
123
+ .env
124
+ .venv
125
+ env/
126
+ venv/
127
+ ENV/
128
+ env.bak/
129
+ venv.bak/
130
+
131
+ # Spyder project settings
132
+ .spyderproject
133
+ .spyproject
134
+
135
+ # Rope project settings
136
+ .ropeproject
137
+
138
+ # mkdocs documentation
139
+ /site
140
+
141
+ # mypy
142
+ .mypy_cache/
143
+ .dmypy.json
144
+ dmypy.json
145
+
146
+ # Pyre type checker
147
+ .pyre/
148
+
149
+ # pytype static type analyzer
150
+ .pytype/
151
+
152
+ # Cython debug symbols
153
+ cython_debug/
154
+
155
+ # PyCharm
156
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
157
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
158
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
159
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
160
+ #.idea/
161
+
162
+ *.pyproject*
163
+ *.user
164
+ /extra/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Frank Bergmann
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,59 @@
1
+ Metadata-Version: 2.4
2
+ Name: whisper-gui
3
+ Version: 0.1.0
4
+ Summary: A GUI application for Whisper speech recognition
5
+ Author-email: "Frank T. Bergmann" <frank.thomas.bergmann@gmail.com>
6
+ License-Expression: MIT
7
+ License-File: LICENSE
8
+ Requires-Python: >=3.8
9
+ Requires-Dist: pyside6>=6.0.0
10
+ Description-Content-Type: text/markdown
11
+
12
+ # whisper-gui
13
+ Basic GUI for openai-whisper
14
+
15
+ A simple graphical user interface for OpenAI's Whisper speech recognition system.
16
+
17
+ ## Features
18
+ - Convert video files to audio
19
+ - Transcribe audio files using Whisper
20
+ - Support for multiple languages
21
+ - Drag & drop support
22
+ - Save transcription settings
23
+
24
+ ## Installation
25
+
26
+ 1. Install ffmpeg (required for audio conversion):
27
+ ```bash
28
+ # Ubuntu/Debian
29
+ sudo apt install ffmpeg
30
+
31
+ # macOS
32
+ brew install ffmpeg
33
+
34
+ # Windows
35
+ # Download from https://ffmpeg.org/download.html or use winget / choco
36
+ winget install ffmpeg
37
+ ```
38
+
39
+ 2. Install whisper-gui:
40
+ ```bash
41
+ pip install openai-whisper
42
+ # or pip install git+https://github.com/openai/whisper.git
43
+ pip install PySide6
44
+ pip install whisper-gui
45
+ ```
46
+
47
+ ## Usage
48
+
49
+ 1. Launch the application:
50
+ ```bash
51
+ whisper-gui
52
+ ```
53
+
54
+ 2. Either:
55
+ - Open a video file and convert it to audio
56
+ - Open an audio file directly
57
+
58
+ 3. Select language and model size
59
+ 4. Click "Transcribe" to generate text from speech
@@ -0,0 +1,48 @@
1
+ # whisper-gui
2
+ Basic GUI for openai-whisper
3
+
4
+ A simple graphical user interface for OpenAI's Whisper speech recognition system.
5
+
6
+ ## Features
7
+ - Convert video files to audio
8
+ - Transcribe audio files using Whisper
9
+ - Support for multiple languages
10
+ - Drag & drop support
11
+ - Save transcription settings
12
+
13
+ ## Installation
14
+
15
+ 1. Install ffmpeg (required for audio conversion):
16
+ ```bash
17
+ # Ubuntu/Debian
18
+ sudo apt install ffmpeg
19
+
20
+ # macOS
21
+ brew install ffmpeg
22
+
23
+ # Windows
24
+ # Download from https://ffmpeg.org/download.html or use winget / choco
25
+ winget install ffmpeg
26
+ ```
27
+
28
+ 2. Install whisper-gui:
29
+ ```bash
30
+ pip install openai-whisper
31
+ # or pip install git+https://github.com/openai/whisper.git
32
+ pip install PySide6
33
+ pip install whisper-gui
34
+ ```
35
+
36
+ ## Usage
37
+
38
+ 1. Launch the application:
39
+ ```bash
40
+ whisper-gui
41
+ ```
42
+
43
+ 2. Either:
44
+ - Open a video file and convert it to audio
45
+ - Open an audio file directly
46
+
47
+ 3. Select language and model size
48
+ 4. Click "Transcribe" to generate text from speech
@@ -0,0 +1,32 @@
1
+ import subprocess
2
+ from pathlib import Path
3
+ from hatchling.builders.hooks.plugin.interface import BuildHookInterface
4
+
5
+
6
+ class UICBuildHook(BuildHookInterface):
7
+ """Build hook to regenerate ui_form.py when form.ui changes."""
8
+
9
+ def initialize(self, version, build_data):
10
+ """Initialize the build hook."""
11
+ # Get the source directory
12
+ src_dir = Path("src/whisper_gui")
13
+ ui_file = src_dir / "form.ui"
14
+ py_file = src_dir / "ui_form.py"
15
+
16
+ # Check if form.ui exists and is newer than ui_form.py
17
+ if ui_file.exists():
18
+ if not py_file.exists() or (
19
+ ui_file.stat().st_mtime > py_file.stat().st_mtime
20
+ ):
21
+ print("Regenerating ui_form.py from form.ui...")
22
+ try:
23
+ subprocess.run(
24
+ ["pyside6-uic", str(ui_file), "-o", str(py_file)],
25
+ check=True,
26
+ capture_output=True,
27
+ text=True
28
+ )
29
+ print("Successfully regenerated ui_form.py")
30
+ except subprocess.CalledProcessError as e:
31
+ print(f"Error regenerating ui_form.py: {e.stderr}")
32
+ raise
@@ -0,0 +1,26 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "whisper-gui"
7
+ version = "0.1.0"
8
+ description = "A GUI application for Whisper speech recognition"
9
+ readme = "README.md"
10
+ requires-python = ">=3.8"
11
+ license = "MIT"
12
+ authors = [
13
+ { name = "Frank T. Bergmann", email = "frank.thomas.bergmann@gmail.com" }
14
+ ]
15
+ dependencies = [
16
+ "PySide6>=6.0.0",
17
+ ]
18
+
19
+ [project.scripts]
20
+ whisper-gui = "whisper_gui.mainwindow:main"
21
+
22
+ [tool.hatch.build.targets.wheel]
23
+ packages = ["src/whisper_gui"]
24
+
25
+ [tool.hatch.build.hooks.custom]
26
+ path = "build_hooks.py"
@@ -0,0 +1 @@
1
+ PySide6
@@ -0,0 +1,5 @@
1
+ """
2
+ Whisper GUI - A GUI application for Whisper speech recognition
3
+ """
4
+
5
+ __version__ = "0.1.0"