deepctl-cmd-debug-audio 0.1.8__tar.gz → 0.1.11__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.
- deepctl_cmd_debug_audio-0.1.11/PKG-INFO +69 -0
- deepctl_cmd_debug_audio-0.1.11/README.md +46 -0
- {deepctl_cmd_debug_audio-0.1.8 → deepctl_cmd_debug_audio-0.1.11}/pyproject.toml +3 -2
- {deepctl_cmd_debug_audio-0.1.8 → deepctl_cmd_debug_audio-0.1.11}/src/deepctl_cmd_debug_audio/command.py +166 -26
- deepctl_cmd_debug_audio-0.1.11/src/deepctl_cmd_debug_audio.egg-info/PKG-INFO +69 -0
- {deepctl_cmd_debug_audio-0.1.8 → deepctl_cmd_debug_audio-0.1.11}/src/deepctl_cmd_debug_audio.egg-info/requires.txt +2 -1
- deepctl_cmd_debug_audio-0.1.8/PKG-INFO +0 -27
- deepctl_cmd_debug_audio-0.1.8/README.md +0 -5
- deepctl_cmd_debug_audio-0.1.8/src/deepctl_cmd_debug_audio.egg-info/PKG-INFO +0 -27
- {deepctl_cmd_debug_audio-0.1.8 → deepctl_cmd_debug_audio-0.1.11}/setup.cfg +0 -0
- {deepctl_cmd_debug_audio-0.1.8 → deepctl_cmd_debug_audio-0.1.11}/src/deepctl_cmd_debug_audio/__init__.py +0 -0
- {deepctl_cmd_debug_audio-0.1.8 → deepctl_cmd_debug_audio-0.1.11}/src/deepctl_cmd_debug_audio/models.py +0 -0
- {deepctl_cmd_debug_audio-0.1.8 → deepctl_cmd_debug_audio-0.1.11}/src/deepctl_cmd_debug_audio.egg-info/SOURCES.txt +0 -0
- {deepctl_cmd_debug_audio-0.1.8 → deepctl_cmd_debug_audio-0.1.11}/src/deepctl_cmd_debug_audio.egg-info/dependency_links.txt +0 -0
- {deepctl_cmd_debug_audio-0.1.8 → deepctl_cmd_debug_audio-0.1.11}/src/deepctl_cmd_debug_audio.egg-info/entry_points.txt +0 -0
- {deepctl_cmd_debug_audio-0.1.8 → deepctl_cmd_debug_audio-0.1.11}/src/deepctl_cmd_debug_audio.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: deepctl-cmd-debug-audio
|
|
3
|
+
Version: 0.1.11
|
|
4
|
+
Summary: Audio debug subcommand for deepctl
|
|
5
|
+
Author-email: Deepgram <devrel@deepgram.com>
|
|
6
|
+
Maintainer-email: Deepgram <devrel@deepgram.com>
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Keywords: deepgram,cli,debug,audio,diagnostics
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Requires-Python: >=3.10
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
Requires-Dist: deepctl-core>=0.1.10
|
|
18
|
+
Requires-Dist: click>=8.0.0
|
|
19
|
+
Requires-Dist: rich>=13.0.0
|
|
20
|
+
Requires-Dist: pydantic>=2.0.0
|
|
21
|
+
Requires-Dist: ffmpeg-python>=0.2.0
|
|
22
|
+
Requires-Dist: httpx>=0.24.0
|
|
23
|
+
|
|
24
|
+
# deepctl-cmd-debug-audio
|
|
25
|
+
|
|
26
|
+
> Part of [deepctl](https://github.com/deepgram/cli) — Official Deepgram CLI
|
|
27
|
+
|
|
28
|
+
Audio debug subcommand for deepctl
|
|
29
|
+
|
|
30
|
+
This is a subcommand of `deepctl debug`.
|
|
31
|
+
|
|
32
|
+
## Installation
|
|
33
|
+
|
|
34
|
+
This package is included with deepctl and does not need to be installed separately.
|
|
35
|
+
|
|
36
|
+
### Install deepctl
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# Install with pip
|
|
40
|
+
pip install deepctl
|
|
41
|
+
|
|
42
|
+
# Or install with uv
|
|
43
|
+
uv tool install deepctl
|
|
44
|
+
|
|
45
|
+
# Or install with pipx
|
|
46
|
+
pipx install deepctl
|
|
47
|
+
|
|
48
|
+
# Or run without installing
|
|
49
|
+
uvx deepctl --help
|
|
50
|
+
pipx run deepctl --help
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Commands
|
|
54
|
+
|
|
55
|
+
| Command | Entry Point |
|
|
56
|
+
|---------|-------------|
|
|
57
|
+
| `deepctl debug audio` | `deepctl_cmd_debug_audio.command:AudioCommand` |
|
|
58
|
+
|
|
59
|
+
## Dependencies
|
|
60
|
+
|
|
61
|
+
- `click>=8.0.0`
|
|
62
|
+
- `rich>=13.0.0`
|
|
63
|
+
- `pydantic>=2.0.0`
|
|
64
|
+
- `ffmpeg-python>=0.2.0`
|
|
65
|
+
- `httpx>=0.24.0`
|
|
66
|
+
|
|
67
|
+
## License
|
|
68
|
+
|
|
69
|
+
MIT — see [LICENSE](../../LICENSE)
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# deepctl-cmd-debug-audio
|
|
2
|
+
|
|
3
|
+
> Part of [deepctl](https://github.com/deepgram/cli) — Official Deepgram CLI
|
|
4
|
+
|
|
5
|
+
Audio debug subcommand for deepctl
|
|
6
|
+
|
|
7
|
+
This is a subcommand of `deepctl debug`.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
This package is included with deepctl and does not need to be installed separately.
|
|
12
|
+
|
|
13
|
+
### Install deepctl
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Install with pip
|
|
17
|
+
pip install deepctl
|
|
18
|
+
|
|
19
|
+
# Or install with uv
|
|
20
|
+
uv tool install deepctl
|
|
21
|
+
|
|
22
|
+
# Or install with pipx
|
|
23
|
+
pipx install deepctl
|
|
24
|
+
|
|
25
|
+
# Or run without installing
|
|
26
|
+
uvx deepctl --help
|
|
27
|
+
pipx run deepctl --help
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Commands
|
|
31
|
+
|
|
32
|
+
| Command | Entry Point |
|
|
33
|
+
|---------|-------------|
|
|
34
|
+
| `deepctl debug audio` | `deepctl_cmd_debug_audio.command:AudioCommand` |
|
|
35
|
+
|
|
36
|
+
## Dependencies
|
|
37
|
+
|
|
38
|
+
- `click>=8.0.0`
|
|
39
|
+
- `rich>=13.0.0`
|
|
40
|
+
- `pydantic>=2.0.0`
|
|
41
|
+
- `ffmpeg-python>=0.2.0`
|
|
42
|
+
- `httpx>=0.24.0`
|
|
43
|
+
|
|
44
|
+
## License
|
|
45
|
+
|
|
46
|
+
MIT — see [LICENSE](../../LICENSE)
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "deepctl-cmd-debug-audio"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.11" # x-release-please-version
|
|
8
8
|
description = "Audio debug subcommand for deepctl"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
@@ -21,11 +21,12 @@ classifiers = [
|
|
|
21
21
|
keywords = ["deepgram", "cli", "debug", "audio", "diagnostics"]
|
|
22
22
|
requires-python = ">=3.10"
|
|
23
23
|
dependencies = [
|
|
24
|
-
"deepctl-core>=0.1.
|
|
24
|
+
"deepctl-core>=0.1.10",
|
|
25
25
|
"click>=8.0.0",
|
|
26
26
|
"rich>=13.0.0",
|
|
27
27
|
"pydantic>=2.0.0",
|
|
28
28
|
"ffmpeg-python>=0.2.0",
|
|
29
|
+
"httpx>=0.24.0",
|
|
29
30
|
]
|
|
30
31
|
|
|
31
32
|
[project.scripts]
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
"""Audio debug command for deepctl."""
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
|
+
import os
|
|
4
5
|
import shutil
|
|
5
6
|
import subprocess
|
|
7
|
+
import tempfile
|
|
6
8
|
from typing import Any
|
|
9
|
+
from urllib.parse import urlparse
|
|
7
10
|
|
|
8
11
|
import ffmpeg # type: ignore[import-untyped]
|
|
12
|
+
import httpx
|
|
9
13
|
from deepctl_core import AuthManager, BaseCommand, Config, DeepgramClient
|
|
10
14
|
from rich import box
|
|
11
15
|
from rich.console import Console
|
|
@@ -24,6 +28,17 @@ class AudioCommand(BaseCommand):
|
|
|
24
28
|
help = "Debug audio file issues for Deepgram transcription"
|
|
25
29
|
short_help = "Debug audio issues"
|
|
26
30
|
|
|
31
|
+
examples = [
|
|
32
|
+
"dg debug audio recording.wav",
|
|
33
|
+
"dg debug audio https://example.com/audio.mp3",
|
|
34
|
+
"dg debug audio podcast.mp3 --verbose",
|
|
35
|
+
]
|
|
36
|
+
agent_help = (
|
|
37
|
+
"Analyze audio files for compatibility with Deepgram's transcription "
|
|
38
|
+
"API. Reports format, codec, sample rate, channels, and duration. "
|
|
39
|
+
"Flags issues that may cause transcription failures."
|
|
40
|
+
)
|
|
41
|
+
|
|
27
42
|
# Audio debug doesn't require auth
|
|
28
43
|
requires_auth = False
|
|
29
44
|
requires_project = False
|
|
@@ -54,8 +69,7 @@ class AudioCommand(BaseCommand):
|
|
|
54
69
|
{
|
|
55
70
|
"names": ["--ffprobe-args"],
|
|
56
71
|
"help": (
|
|
57
|
-
"Custom ffprobe arguments "
|
|
58
|
-
"(e.g., '-show_streams -show_format')"
|
|
72
|
+
"Custom ffprobe arguments (e.g., '-show_streams -show_format')"
|
|
59
73
|
),
|
|
60
74
|
"type": str,
|
|
61
75
|
"is_option": True,
|
|
@@ -66,6 +80,113 @@ class AudioCommand(BaseCommand):
|
|
|
66
80
|
"""Check if ffmpeg/ffprobe is installed."""
|
|
67
81
|
return shutil.which("ffprobe") is not None
|
|
68
82
|
|
|
83
|
+
def _is_url(self, path: str) -> bool:
|
|
84
|
+
"""Check if the path is a URL."""
|
|
85
|
+
parsed = urlparse(path)
|
|
86
|
+
return parsed.scheme in ("http", "https")
|
|
87
|
+
|
|
88
|
+
def _download_url(self, url: str) -> str:
|
|
89
|
+
"""Download a URL to a temporary file and return the path."""
|
|
90
|
+
console.print(f"[blue]Downloading:[/blue] {url}")
|
|
91
|
+
|
|
92
|
+
parsed = urlparse(url)
|
|
93
|
+
ext = os.path.splitext(parsed.path)[1] or ".audio"
|
|
94
|
+
|
|
95
|
+
with tempfile.NamedTemporaryFile(
|
|
96
|
+
suffix=ext, prefix="deepctl_audio_", delete=False
|
|
97
|
+
) as tmp:
|
|
98
|
+
tmp_name = tmp.name
|
|
99
|
+
try:
|
|
100
|
+
with (
|
|
101
|
+
httpx.Client(timeout=60.0, follow_redirects=True) as client,
|
|
102
|
+
client.stream("GET", url) as response,
|
|
103
|
+
):
|
|
104
|
+
response.raise_for_status()
|
|
105
|
+
total = 0
|
|
106
|
+
for chunk in response.iter_bytes(chunk_size=8192):
|
|
107
|
+
tmp.write(chunk)
|
|
108
|
+
total += len(chunk)
|
|
109
|
+
size_mb = total / (1024 * 1024)
|
|
110
|
+
console.print(
|
|
111
|
+
f"[green]Downloaded[/green] {size_mb:.2f} MB → {tmp_name}"
|
|
112
|
+
)
|
|
113
|
+
return tmp_name
|
|
114
|
+
except Exception:
|
|
115
|
+
os.unlink(tmp_name)
|
|
116
|
+
raise
|
|
117
|
+
|
|
118
|
+
def _suggest_encoding(self, audio_info: AudioInfo) -> None:
|
|
119
|
+
"""Suggest optimal Deepgram settings based on audio analysis."""
|
|
120
|
+
if not audio_info.streams:
|
|
121
|
+
return
|
|
122
|
+
|
|
123
|
+
console.print("\n[bold]Encoding Suggestions:[/bold]")
|
|
124
|
+
|
|
125
|
+
stream = audio_info.streams[0]
|
|
126
|
+
suggestions = []
|
|
127
|
+
|
|
128
|
+
# Sample rate suggestions
|
|
129
|
+
if stream.sample_rate:
|
|
130
|
+
rate = int(stream.sample_rate)
|
|
131
|
+
if rate == 8000:
|
|
132
|
+
suggestions.append(
|
|
133
|
+
"Telephony audio detected (8kHz) — "
|
|
134
|
+
"use `encoding=mulaw` or `encoding=linear16` "
|
|
135
|
+
"with `sample_rate=8000`"
|
|
136
|
+
)
|
|
137
|
+
elif rate <= 16000:
|
|
138
|
+
suggestions.append(
|
|
139
|
+
f"Sample rate {rate}Hz — suitable for speech. "
|
|
140
|
+
f"Consider `encoding=linear16` with "
|
|
141
|
+
f"`sample_rate={rate}`"
|
|
142
|
+
)
|
|
143
|
+
elif rate >= 44100:
|
|
144
|
+
suggestions.append(
|
|
145
|
+
f"High sample rate ({rate}Hz) — "
|
|
146
|
+
f"downsampling to 16kHz is recommended for "
|
|
147
|
+
f"faster processing without quality loss"
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
# Codec suggestions
|
|
151
|
+
if stream.codec_name:
|
|
152
|
+
codec = stream.codec_name.lower()
|
|
153
|
+
if codec == "opus":
|
|
154
|
+
suggestions.append(
|
|
155
|
+
"Opus codec detected — ideal for web streaming. Use `encoding=opus`"
|
|
156
|
+
)
|
|
157
|
+
elif codec in ("pcm_s16le", "pcm_s16be"):
|
|
158
|
+
suggestions.append("Linear PCM detected — use `encoding=linear16`")
|
|
159
|
+
elif codec in ("pcm_mulaw", "pcm_alaw"):
|
|
160
|
+
enc = "mulaw" if "mulaw" in codec else "alaw"
|
|
161
|
+
suggestions.append(f"{codec} detected — use `encoding={enc}`")
|
|
162
|
+
elif codec == "mp3":
|
|
163
|
+
suggestions.append(
|
|
164
|
+
"MP3 detected — Deepgram handles MP3 natively. "
|
|
165
|
+
"No encoding parameter needed for pre-recorded."
|
|
166
|
+
)
|
|
167
|
+
elif codec in ("flac", "vorbis", "aac"):
|
|
168
|
+
suggestions.append(
|
|
169
|
+
f"{codec.upper()} detected — Deepgram handles "
|
|
170
|
+
f"this natively for pre-recorded. For streaming, "
|
|
171
|
+
f"consider converting to linear16 or opus."
|
|
172
|
+
)
|
|
173
|
+
|
|
174
|
+
# Channel suggestions
|
|
175
|
+
if stream.channels and stream.channels > 1:
|
|
176
|
+
suggestions.append(
|
|
177
|
+
f"Multi-channel ({stream.channels}ch) — use "
|
|
178
|
+
f"`channels={stream.channels}` and consider "
|
|
179
|
+
f"`multichannel=true` for speaker separation"
|
|
180
|
+
)
|
|
181
|
+
elif stream.channels == 1:
|
|
182
|
+
suggestions.append("Mono audio — optimal for single-speaker transcription")
|
|
183
|
+
|
|
184
|
+
if suggestions:
|
|
185
|
+
for suggestion in suggestions:
|
|
186
|
+
console.print(f" [dim]→[/dim] {suggestion}")
|
|
187
|
+
else:
|
|
188
|
+
console.print(" [green]No specific encoding changes needed[/green]")
|
|
189
|
+
|
|
69
190
|
def run_ffprobe(
|
|
70
191
|
self, file_path: str, custom_args: str | None = None
|
|
71
192
|
) -> dict[str, Any]:
|
|
@@ -106,9 +227,7 @@ class AudioCommand(BaseCommand):
|
|
|
106
227
|
else None
|
|
107
228
|
),
|
|
108
229
|
size=(
|
|
109
|
-
int(format_data.get("size", 0))
|
|
110
|
-
if format_data.get("size")
|
|
111
|
-
else None
|
|
230
|
+
int(format_data.get("size", 0)) if format_data.get("size") else None
|
|
112
231
|
),
|
|
113
232
|
bit_rate=format_data.get("bit_rate"),
|
|
114
233
|
nb_streams=(
|
|
@@ -156,9 +275,7 @@ class AudioCommand(BaseCommand):
|
|
|
156
275
|
|
|
157
276
|
if audio_info.format.duration:
|
|
158
277
|
minutes, seconds = divmod(audio_info.format.duration, 60)
|
|
159
|
-
console.print(
|
|
160
|
-
f" • Duration: {int(minutes):02d}:{seconds:06.3f}"
|
|
161
|
-
)
|
|
278
|
+
console.print(f" • Duration: {int(minutes):02d}:{seconds:06.3f}")
|
|
162
279
|
|
|
163
280
|
if audio_info.format.size:
|
|
164
281
|
size_mb = audio_info.format.size / (1024 * 1024)
|
|
@@ -174,9 +291,7 @@ class AudioCommand(BaseCommand):
|
|
|
174
291
|
for i, stream in enumerate(audio_info.streams):
|
|
175
292
|
if len(audio_info.streams) > 1:
|
|
176
293
|
console.print(f"\n Stream {i + 1}:")
|
|
177
|
-
codec_name =
|
|
178
|
-
stream.codec_long_name or stream.codec_name or "Unknown"
|
|
179
|
-
)
|
|
294
|
+
codec_name = stream.codec_long_name or stream.codec_name or "Unknown"
|
|
180
295
|
console.print(f" • Codec: {codec_name}")
|
|
181
296
|
if stream.sample_rate:
|
|
182
297
|
console.print(f" • Sample Rate: {stream.sample_rate} Hz")
|
|
@@ -187,9 +302,7 @@ class AudioCommand(BaseCommand):
|
|
|
187
302
|
)
|
|
188
303
|
if stream.bit_rate:
|
|
189
304
|
bit_rate_kbps = int(stream.bit_rate) / 1000
|
|
190
|
-
console.print(
|
|
191
|
-
f" • Stream Bit Rate: {bit_rate_kbps:.0f} kbps"
|
|
192
|
-
)
|
|
305
|
+
console.print(f" • Stream Bit Rate: {bit_rate_kbps:.0f} kbps")
|
|
193
306
|
|
|
194
307
|
def display_verbose_info(self, audio_info: AudioInfo) -> None:
|
|
195
308
|
"""Display detailed audio information in table format."""
|
|
@@ -248,9 +361,7 @@ class AudioCommand(BaseCommand):
|
|
|
248
361
|
display_value = f"{bit_rate_kbps:.0f} kbps"
|
|
249
362
|
elif key == "duration" and value:
|
|
250
363
|
minutes, seconds = divmod(value, 60)
|
|
251
|
-
display_value = (
|
|
252
|
-
f"{int(minutes):02d}:{seconds:06.3f}"
|
|
253
|
-
)
|
|
364
|
+
display_value = f"{int(minutes):02d}:{seconds:06.3f}"
|
|
254
365
|
|
|
255
366
|
stream_table.add_row(display_key, display_value)
|
|
256
367
|
|
|
@@ -268,9 +379,7 @@ class AudioCommand(BaseCommand):
|
|
|
268
379
|
from rich.syntax import Syntax
|
|
269
380
|
|
|
270
381
|
json_str = json.dumps(audio_info.raw_data, indent=2)
|
|
271
|
-
syntax = Syntax(
|
|
272
|
-
json_str, "json", theme="monokai", line_numbers=True
|
|
273
|
-
)
|
|
382
|
+
syntax = Syntax(json_str, "json", theme="monokai", line_numbers=True)
|
|
274
383
|
console.print(syntax)
|
|
275
384
|
|
|
276
385
|
def handle(
|
|
@@ -320,12 +429,35 @@ class AudioCommand(BaseCommand):
|
|
|
320
429
|
ffmpeg_installed=False,
|
|
321
430
|
)
|
|
322
431
|
|
|
432
|
+
# Handle URL downloads
|
|
433
|
+
downloaded_file = None
|
|
434
|
+
file_to_analyze = str(audio_file)
|
|
435
|
+
|
|
436
|
+
if self._is_url(audio_file):
|
|
437
|
+
try:
|
|
438
|
+
downloaded_file = self._download_url(audio_file)
|
|
439
|
+
file_to_analyze = downloaded_file
|
|
440
|
+
except Exception as e:
|
|
441
|
+
console.print(
|
|
442
|
+
Panel(
|
|
443
|
+
f"[red]✗ Failed to download URL[/red]\n\n[dim]{e!s}[/dim]",
|
|
444
|
+
title="Download Failed",
|
|
445
|
+
border_style="red",
|
|
446
|
+
)
|
|
447
|
+
)
|
|
448
|
+
return AudioDebugResult(
|
|
449
|
+
status="error",
|
|
450
|
+
message="Failed to download audio URL",
|
|
451
|
+
audio_file=audio_file,
|
|
452
|
+
error_details=str(e),
|
|
453
|
+
)
|
|
454
|
+
|
|
323
455
|
# Process the audio file
|
|
324
456
|
try:
|
|
325
|
-
console.print(f"[blue]Analyzing audio file:[/blue] {
|
|
457
|
+
console.print(f"[blue]Analyzing audio file:[/blue] {file_to_analyze}")
|
|
326
458
|
|
|
327
459
|
# Run ffprobe
|
|
328
|
-
probe_data = self.run_ffprobe(
|
|
460
|
+
probe_data = self.run_ffprobe(file_to_analyze, ffprobe_args)
|
|
329
461
|
|
|
330
462
|
# Parse the data
|
|
331
463
|
audio_info = self.parse_audio_info(probe_data)
|
|
@@ -364,10 +496,12 @@ class AudioCommand(BaseCommand):
|
|
|
364
496
|
console.print(f" {issue}")
|
|
365
497
|
else:
|
|
366
498
|
console.print(
|
|
367
|
-
" [green]✓[/green] Audio appears to be compatible "
|
|
368
|
-
"with Deepgram"
|
|
499
|
+
" [green]✓[/green] Audio appears to be compatible with Deepgram"
|
|
369
500
|
)
|
|
370
501
|
|
|
502
|
+
# Encoding suggestions
|
|
503
|
+
self._suggest_encoding(audio_info)
|
|
504
|
+
|
|
371
505
|
return AudioDebugResult(
|
|
372
506
|
status="success",
|
|
373
507
|
message="Audio file analyzed successfully",
|
|
@@ -378,8 +512,7 @@ class AudioCommand(BaseCommand):
|
|
|
378
512
|
except Exception as e:
|
|
379
513
|
console.print(
|
|
380
514
|
Panel(
|
|
381
|
-
f"[red]✗ Error analyzing audio file[/red]\n\n"
|
|
382
|
-
f"[dim]{e!s}[/dim]",
|
|
515
|
+
f"[red]✗ Error analyzing audio file[/red]\n\n[dim]{e!s}[/dim]",
|
|
383
516
|
title="Analysis Failed",
|
|
384
517
|
border_style="red",
|
|
385
518
|
)
|
|
@@ -391,3 +524,10 @@ class AudioCommand(BaseCommand):
|
|
|
391
524
|
audio_file=audio_file,
|
|
392
525
|
error_details=str(e),
|
|
393
526
|
)
|
|
527
|
+
finally:
|
|
528
|
+
# Clean up downloaded file
|
|
529
|
+
if downloaded_file:
|
|
530
|
+
try:
|
|
531
|
+
os.unlink(downloaded_file)
|
|
532
|
+
except OSError:
|
|
533
|
+
pass
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: deepctl-cmd-debug-audio
|
|
3
|
+
Version: 0.1.11
|
|
4
|
+
Summary: Audio debug subcommand for deepctl
|
|
5
|
+
Author-email: Deepgram <devrel@deepgram.com>
|
|
6
|
+
Maintainer-email: Deepgram <devrel@deepgram.com>
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Keywords: deepgram,cli,debug,audio,diagnostics
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Requires-Python: >=3.10
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
Requires-Dist: deepctl-core>=0.1.10
|
|
18
|
+
Requires-Dist: click>=8.0.0
|
|
19
|
+
Requires-Dist: rich>=13.0.0
|
|
20
|
+
Requires-Dist: pydantic>=2.0.0
|
|
21
|
+
Requires-Dist: ffmpeg-python>=0.2.0
|
|
22
|
+
Requires-Dist: httpx>=0.24.0
|
|
23
|
+
|
|
24
|
+
# deepctl-cmd-debug-audio
|
|
25
|
+
|
|
26
|
+
> Part of [deepctl](https://github.com/deepgram/cli) — Official Deepgram CLI
|
|
27
|
+
|
|
28
|
+
Audio debug subcommand for deepctl
|
|
29
|
+
|
|
30
|
+
This is a subcommand of `deepctl debug`.
|
|
31
|
+
|
|
32
|
+
## Installation
|
|
33
|
+
|
|
34
|
+
This package is included with deepctl and does not need to be installed separately.
|
|
35
|
+
|
|
36
|
+
### Install deepctl
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# Install with pip
|
|
40
|
+
pip install deepctl
|
|
41
|
+
|
|
42
|
+
# Or install with uv
|
|
43
|
+
uv tool install deepctl
|
|
44
|
+
|
|
45
|
+
# Or install with pipx
|
|
46
|
+
pipx install deepctl
|
|
47
|
+
|
|
48
|
+
# Or run without installing
|
|
49
|
+
uvx deepctl --help
|
|
50
|
+
pipx run deepctl --help
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Commands
|
|
54
|
+
|
|
55
|
+
| Command | Entry Point |
|
|
56
|
+
|---------|-------------|
|
|
57
|
+
| `deepctl debug audio` | `deepctl_cmd_debug_audio.command:AudioCommand` |
|
|
58
|
+
|
|
59
|
+
## Dependencies
|
|
60
|
+
|
|
61
|
+
- `click>=8.0.0`
|
|
62
|
+
- `rich>=13.0.0`
|
|
63
|
+
- `pydantic>=2.0.0`
|
|
64
|
+
- `ffmpeg-python>=0.2.0`
|
|
65
|
+
- `httpx>=0.24.0`
|
|
66
|
+
|
|
67
|
+
## License
|
|
68
|
+
|
|
69
|
+
MIT — see [LICENSE](../../LICENSE)
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: deepctl-cmd-debug-audio
|
|
3
|
-
Version: 0.1.8
|
|
4
|
-
Summary: Audio debug subcommand for deepctl
|
|
5
|
-
Author-email: Deepgram <devrel@deepgram.com>
|
|
6
|
-
Maintainer-email: Deepgram <devrel@deepgram.com>
|
|
7
|
-
License-Expression: MIT
|
|
8
|
-
Keywords: deepgram,cli,debug,audio,diagnostics
|
|
9
|
-
Classifier: Development Status :: 3 - Alpha
|
|
10
|
-
Classifier: Intended Audience :: Developers
|
|
11
|
-
Classifier: Programming Language :: Python :: 3
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
-
Requires-Python: >=3.10
|
|
16
|
-
Description-Content-Type: text/markdown
|
|
17
|
-
Requires-Dist: deepctl-core>=0.1.8
|
|
18
|
-
Requires-Dist: click>=8.0.0
|
|
19
|
-
Requires-Dist: rich>=13.0.0
|
|
20
|
-
Requires-Dist: pydantic>=2.0.0
|
|
21
|
-
Requires-Dist: ffmpeg-python>=0.2.0
|
|
22
|
-
|
|
23
|
-
# deepctl-cmd-debug-audio
|
|
24
|
-
|
|
25
|
-
Audio debug subcommand for the Deepgram CLI (deepctl). This package provides the `audio` subcommand under the `debug` command group, allowing users to debug audio-related issues using ffprobe presets.
|
|
26
|
-
|
|
27
|
-
`ffmpeg` is required.
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: deepctl-cmd-debug-audio
|
|
3
|
-
Version: 0.1.8
|
|
4
|
-
Summary: Audio debug subcommand for deepctl
|
|
5
|
-
Author-email: Deepgram <devrel@deepgram.com>
|
|
6
|
-
Maintainer-email: Deepgram <devrel@deepgram.com>
|
|
7
|
-
License-Expression: MIT
|
|
8
|
-
Keywords: deepgram,cli,debug,audio,diagnostics
|
|
9
|
-
Classifier: Development Status :: 3 - Alpha
|
|
10
|
-
Classifier: Intended Audience :: Developers
|
|
11
|
-
Classifier: Programming Language :: Python :: 3
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
-
Requires-Python: >=3.10
|
|
16
|
-
Description-Content-Type: text/markdown
|
|
17
|
-
Requires-Dist: deepctl-core>=0.1.8
|
|
18
|
-
Requires-Dist: click>=8.0.0
|
|
19
|
-
Requires-Dist: rich>=13.0.0
|
|
20
|
-
Requires-Dist: pydantic>=2.0.0
|
|
21
|
-
Requires-Dist: ffmpeg-python>=0.2.0
|
|
22
|
-
|
|
23
|
-
# deepctl-cmd-debug-audio
|
|
24
|
-
|
|
25
|
-
Audio debug subcommand for the Deepgram CLI (deepctl). This package provides the `audio` subcommand under the `debug` command group, allowing users to debug audio-related issues using ffprobe presets.
|
|
26
|
-
|
|
27
|
-
`ffmpeg` is required.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|