scribe-cli 0.11.0__tar.gz → 0.11.1__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.
- {scribe_cli-0.11.0/scribe_cli.egg-info → scribe_cli-0.11.1}/PKG-INFO +5 -3
- {scribe_cli-0.11.0 → scribe_cli-0.11.1}/README.md +5 -3
- {scribe_cli-0.11.0 → scribe_cli-0.11.1}/scribe/_version.py +2 -2
- {scribe_cli-0.11.0 → scribe_cli-0.11.1}/scribe/app.py +12 -24
- {scribe_cli-0.11.0 → scribe_cli-0.11.1/scribe_cli.egg-info}/PKG-INFO +5 -3
- {scribe_cli-0.11.0 → scribe_cli-0.11.1}/.github/workflows/pypi.yml +0 -0
- {scribe_cli-0.11.0 → scribe_cli-0.11.1}/.gitignore +0 -0
- {scribe_cli-0.11.0 → scribe_cli-0.11.1}/LICENSE +0 -0
- {scribe_cli-0.11.0 → scribe_cli-0.11.1}/icon.xcf +0 -0
- {scribe_cli-0.11.0 → scribe_cli-0.11.1}/pyproject.toml +0 -0
- {scribe_cli-0.11.0 → scribe_cli-0.11.1}/scribe/__init__.py +0 -0
- {scribe_cli-0.11.0 → scribe_cli-0.11.1}/scribe/audio.py +0 -0
- {scribe_cli-0.11.0 → scribe_cli-0.11.1}/scribe/install_desktop.py +0 -0
- {scribe_cli-0.11.0 → scribe_cli-0.11.1}/scribe/keyboard.py +0 -0
- {scribe_cli-0.11.0 → scribe_cli-0.11.1}/scribe/models.py +0 -0
- {scribe_cli-0.11.0 → scribe_cli-0.11.1}/scribe/models.toml +0 -0
- {scribe_cli-0.11.0 → scribe_cli-0.11.1}/scribe/saverecording.py +0 -0
- {scribe_cli-0.11.0 → scribe_cli-0.11.1}/scribe/testpynput.py +0 -0
- {scribe_cli-0.11.0 → scribe_cli-0.11.1}/scribe/util.py +0 -0
- {scribe_cli-0.11.0 → scribe_cli-0.11.1}/scribe_cli.egg-info/SOURCES.txt +0 -0
- {scribe_cli-0.11.0 → scribe_cli-0.11.1}/scribe_cli.egg-info/dependency_links.txt +0 -0
- {scribe_cli-0.11.0 → scribe_cli-0.11.1}/scribe_cli.egg-info/entry_points.txt +0 -0
- {scribe_cli-0.11.0 → scribe_cli-0.11.1}/scribe_cli.egg-info/requires.txt +0 -0
- {scribe_cli-0.11.0 → scribe_cli-0.11.1}/scribe_cli.egg-info/top_level.txt +0 -0
- {scribe_cli-0.11.0 → scribe_cli-0.11.1}/scribe_data/__init__.py +0 -0
- {scribe_cli-0.11.0 → scribe_cli-0.11.1}/scribe_data/share/icon.png +0 -0
- {scribe_cli-0.11.0 → scribe_cli-0.11.1}/scribe_data/share/icon_recording.png +0 -0
- {scribe_cli-0.11.0 → scribe_cli-0.11.1}/scribe_data/share/icon_writing.png +0 -0
- {scribe_cli-0.11.0 → scribe_cli-0.11.1}/scribe_data/templates/scribe.desktop +0 -0
- {scribe_cli-0.11.0 → scribe_cli-0.11.1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: scribe-cli
|
|
3
|
-
Version: 0.11.
|
|
3
|
+
Version: 0.11.1
|
|
4
4
|
Summary: scribe is a local speech recognition tool that provides real-time transcription using vosk and whisper AI, with the goal of serving as a virtual keyboard on a computer
|
|
5
5
|
Author-email: Mahé Perrette <mahe.perrette@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -158,7 +158,7 @@ The content of the (full) transcription is then pasted to the clipboard, and it
|
|
|
158
158
|
Alternatively an output file can be indicated:
|
|
159
159
|
|
|
160
160
|
```bash
|
|
161
|
-
|
|
161
|
+
scribe -o transcription.txt
|
|
162
162
|
```
|
|
163
163
|
|
|
164
164
|
### Virtual keyboard (experimental)
|
|
@@ -205,6 +205,8 @@ sudo apt install libcairo-dev libgirepository1.0-dev gir1.2-appindicator3-0.1
|
|
|
205
205
|
pip install PyGObject
|
|
206
206
|
```
|
|
207
207
|
|
|
208
|
+
<img src=https://github.com/user-attachments/assets/4c97f4b1-1a65-4d49-9f5a-a9f4287cfa5a width=300px>
|
|
209
|
+
|
|
208
210
|
## Start as an application in GNOME
|
|
209
211
|
|
|
210
212
|
If you run Ubuntu (or else?) with GNOME, the script `scribe-install [...]` will create a `scribe.desktop` file and place it under `$HOME/.local/share/applications`
|
|
@@ -221,7 +223,7 @@ scribe-install --clipboard --api YOUROPENAIAPIKEY
|
|
|
221
223
|
And to make an app running outside the terminal:
|
|
222
224
|
|
|
223
225
|
```bash
|
|
224
|
-
scribe-install --backend openaiapi --name "Scribe App" --keyboard --clipboard --app --no-prompt --no-terminal
|
|
226
|
+
scribe-install --backend openaiapi --name "Scribe App" --keyboard --clipboard --app --no-prompt --no-terminal --restart-after-silence --api YOUROPENAIAPIKEY
|
|
225
227
|
```
|
|
226
228
|
This will install two separate apps (names "Scribe" and "Scribe App")
|
|
227
229
|
|
|
@@ -90,7 +90,7 @@ The content of the (full) transcription is then pasted to the clipboard, and it
|
|
|
90
90
|
Alternatively an output file can be indicated:
|
|
91
91
|
|
|
92
92
|
```bash
|
|
93
|
-
|
|
93
|
+
scribe -o transcription.txt
|
|
94
94
|
```
|
|
95
95
|
|
|
96
96
|
### Virtual keyboard (experimental)
|
|
@@ -137,6 +137,8 @@ sudo apt install libcairo-dev libgirepository1.0-dev gir1.2-appindicator3-0.1
|
|
|
137
137
|
pip install PyGObject
|
|
138
138
|
```
|
|
139
139
|
|
|
140
|
+
<img src=https://github.com/user-attachments/assets/4c97f4b1-1a65-4d49-9f5a-a9f4287cfa5a width=300px>
|
|
141
|
+
|
|
140
142
|
## Start as an application in GNOME
|
|
141
143
|
|
|
142
144
|
If you run Ubuntu (or else?) with GNOME, the script `scribe-install [...]` will create a `scribe.desktop` file and place it under `$HOME/.local/share/applications`
|
|
@@ -153,7 +155,7 @@ scribe-install --clipboard --api YOUROPENAIAPIKEY
|
|
|
153
155
|
And to make an app running outside the terminal:
|
|
154
156
|
|
|
155
157
|
```bash
|
|
156
|
-
scribe-install --backend openaiapi --name "Scribe App" --keyboard --clipboard --app --no-prompt --no-terminal
|
|
158
|
+
scribe-install --backend openaiapi --name "Scribe App" --keyboard --clipboard --app --no-prompt --no-terminal --restart-after-silence --api YOUROPENAIAPIKEY
|
|
157
159
|
```
|
|
158
160
|
This will install two separate apps (names "Scribe" and "Scribe App")
|
|
159
161
|
|
|
@@ -165,4 +167,4 @@ Best is to check the available options in the online help:
|
|
|
165
167
|
|
|
166
168
|
```bash
|
|
167
169
|
scribe --help
|
|
168
|
-
```
|
|
170
|
+
```
|
|
@@ -272,15 +272,7 @@ def create_app(micro, transcriber, other_transcribers=None, **kwargs):
|
|
|
272
272
|
|
|
273
273
|
def update_icon(icon, force=False):
|
|
274
274
|
transcriber = icon._transcriber
|
|
275
|
-
if transcriber.recording
|
|
276
|
-
# this is the situation with the whisper backend when the microphone is recording
|
|
277
|
-
# but we wait for the speaker to speak (silence)
|
|
278
|
-
if force or getattr(icon, "_icon_label", None) != None:
|
|
279
|
-
icon.icon = image
|
|
280
|
-
icon._icon_label = None
|
|
281
|
-
icon.update_menu()
|
|
282
|
-
|
|
283
|
-
elif transcriber.recording:
|
|
275
|
+
if transcriber.recording:
|
|
284
276
|
if force or getattr(icon, "_icon_label", None) != "recording":
|
|
285
277
|
icon.icon = image_recording
|
|
286
278
|
icon._icon_label = "recording"
|
|
@@ -326,8 +318,8 @@ def create_app(micro, transcriber, other_transcribers=None, **kwargs):
|
|
|
326
318
|
def callback_record(icon, item):
|
|
327
319
|
transcriber = icon._transcriber
|
|
328
320
|
if transcriber.busy:
|
|
329
|
-
transcriber.log("Still busy recording or transcribing.")
|
|
330
|
-
return
|
|
321
|
+
# transcriber.log("Still busy recording or transcribing.")
|
|
322
|
+
return callback_stop_recording(icon, item) # play / stop behavior
|
|
331
323
|
|
|
332
324
|
if hasattr(icon, "_recording_thread") and icon._recording_thread.is_alive():
|
|
333
325
|
icon._recording_thread.join()
|
|
@@ -357,18 +349,9 @@ def create_app(micro, transcriber, other_transcribers=None, **kwargs):
|
|
|
357
349
|
# icon.menu.items[0].__name__ = f"Record [{str(item)}]"
|
|
358
350
|
icon._model_selection = False
|
|
359
351
|
icon.update_menu()
|
|
360
|
-
icon.notify(f"Set {transcriber.backend} {transcriber.model_name}")
|
|
361
|
-
|
|
362
|
-
def callback_info(icon, item):
|
|
363
|
-
transcriber = icon._transcriber
|
|
364
|
-
# icon.notify(f"scribe {transcriber.backend} {transcriber.model_name}")
|
|
365
|
-
title = f"""{transcriber.backend} :: {transcriber.model_name}"""
|
|
366
|
-
info = [name for name in kwargs if isinstance(kwargs[name], bool) and kwargs[name]]
|
|
367
|
-
icon.notify(" | ".join(info), title=title)
|
|
368
352
|
|
|
369
353
|
def callback_toggle_option(icon, item):
|
|
370
354
|
kwargs[str(item)] = not kwargs[str(item)]
|
|
371
|
-
callback_info(icon, item)
|
|
372
355
|
|
|
373
356
|
def is_model_selection(item):
|
|
374
357
|
return icon._model_selection
|
|
@@ -379,19 +362,24 @@ def create_app(micro, transcriber, other_transcribers=None, **kwargs):
|
|
|
379
362
|
def is_not_recording(item):
|
|
380
363
|
return not is_recording(item) and not is_model_selection(item)
|
|
381
364
|
|
|
365
|
+
def is_checked(item):
|
|
366
|
+
return icon._transcriber.model_name == str(item)
|
|
367
|
+
|
|
368
|
+
def is_checked_option(item):
|
|
369
|
+
return kwargs[str(item)]
|
|
370
|
+
|
|
382
371
|
modeltitle = f"{transcriber.backend} :: {transcriber.model_name}"
|
|
383
372
|
title = f"scribe :: {modeltitle}"
|
|
384
373
|
|
|
385
374
|
menus = []
|
|
386
|
-
menus.append(Item(f"Record"
|
|
375
|
+
menus.append(Item(f"Record", callback_record, visible=is_not_recording, default=True))
|
|
387
376
|
menus.append(Item("Stop", callback_stop_recording, visible=is_recording))
|
|
388
377
|
menus.append(Item("Choose Model", pystrayMenu(
|
|
389
|
-
*(Item(f"{name}", callback_set_model) for name in other_transcribers_dict)))
|
|
378
|
+
*(Item(f"{name}", callback_set_model, checked=is_checked) for name in other_transcribers_dict)))
|
|
390
379
|
)
|
|
391
380
|
menus.append(Item("Toggle Options", pystrayMenu(
|
|
392
|
-
*(Item(f"{name}", callback_toggle_option) for name in kwargs if isinstance(kwargs[name], bool))))
|
|
381
|
+
*(Item(f"{name}", callback_toggle_option, checked=is_checked_option) for name in kwargs if isinstance(kwargs[name], bool))))
|
|
393
382
|
)
|
|
394
|
-
menus.append(Item(f"Info", callback_info))
|
|
395
383
|
menus.append(Item('Quit', callback_quit))
|
|
396
384
|
|
|
397
385
|
# Create a menu
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: scribe-cli
|
|
3
|
-
Version: 0.11.
|
|
3
|
+
Version: 0.11.1
|
|
4
4
|
Summary: scribe is a local speech recognition tool that provides real-time transcription using vosk and whisper AI, with the goal of serving as a virtual keyboard on a computer
|
|
5
5
|
Author-email: Mahé Perrette <mahe.perrette@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -158,7 +158,7 @@ The content of the (full) transcription is then pasted to the clipboard, and it
|
|
|
158
158
|
Alternatively an output file can be indicated:
|
|
159
159
|
|
|
160
160
|
```bash
|
|
161
|
-
|
|
161
|
+
scribe -o transcription.txt
|
|
162
162
|
```
|
|
163
163
|
|
|
164
164
|
### Virtual keyboard (experimental)
|
|
@@ -205,6 +205,8 @@ sudo apt install libcairo-dev libgirepository1.0-dev gir1.2-appindicator3-0.1
|
|
|
205
205
|
pip install PyGObject
|
|
206
206
|
```
|
|
207
207
|
|
|
208
|
+
<img src=https://github.com/user-attachments/assets/4c97f4b1-1a65-4d49-9f5a-a9f4287cfa5a width=300px>
|
|
209
|
+
|
|
208
210
|
## Start as an application in GNOME
|
|
209
211
|
|
|
210
212
|
If you run Ubuntu (or else?) with GNOME, the script `scribe-install [...]` will create a `scribe.desktop` file and place it under `$HOME/.local/share/applications`
|
|
@@ -221,7 +223,7 @@ scribe-install --clipboard --api YOUROPENAIAPIKEY
|
|
|
221
223
|
And to make an app running outside the terminal:
|
|
222
224
|
|
|
223
225
|
```bash
|
|
224
|
-
scribe-install --backend openaiapi --name "Scribe App" --keyboard --clipboard --app --no-prompt --no-terminal
|
|
226
|
+
scribe-install --backend openaiapi --name "Scribe App" --keyboard --clipboard --app --no-prompt --no-terminal --restart-after-silence --api YOUROPENAIAPIKEY
|
|
225
227
|
```
|
|
226
228
|
This will install two separate apps (names "Scribe" and "Scribe App")
|
|
227
229
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|