Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ pyannote-database = "pyannote.database.cli:main"

[project.optional-dependencies]
cli = [
"textual>=8.0.0",
"typer>=0.15.1",
]
test = [
Expand Down
17 changes: 16 additions & 1 deletion src/pyannote/database/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
import typer
from enum import Enum
import math
from typing import Text
from pathlib import Path
from typing import Optional, Text
from pyannote.database import Database
from pyannote.database import registry
from pyannote.database.protocol import CollectionProtocol
Expand Down Expand Up @@ -177,5 +178,19 @@ def iterate():
typer.echo(f" {len(speakers)} speakers")


@app.command("tui")
def tui_command(
registry_path: Optional[Path] = typer.Argument(
None,
metavar="DATABASE_YML",
help="Path to database.yml registry file.",
),
):
"""Launch interactive TUI to browse the registry"""
from pyannote.database.tui import RegistryApp

RegistryApp(registry_path=registry_path).run()


def main():
app()
Loading
Loading