diff --git a/src/wscribe/backends/fasterwhisper.py b/src/wscribe/backends/fasterwhisper.py index 901d70b..0e55efc 100644 --- a/src/wscribe/backends/fasterwhisper.py +++ b/src/wscribe/backends/fasterwhisper.py @@ -1,7 +1,7 @@ import math import os from dataclasses import dataclass -from typing import Any, Mapping, MutableMapping +from typing import Any, Mapping, MutableMapping, Optional import numpy as np import structlog @@ -37,7 +37,7 @@ def load(self) -> None: ) def transcribe( - self, input: np.ndarray, language: str = None, silent: bool = False + self, input: np.ndarray, language: Optional[str] = None, silent: bool = False ) -> list[TranscribedData]: """ Return word level transcription data. diff --git a/src/wscribe/cli/main.py b/src/wscribe/cli/main.py index eb7ff8b..18c8bf5 100644 --- a/src/wscribe/cli/main.py +++ b/src/wscribe/cli/main.py @@ -51,7 +51,7 @@ def cli(): @click.option( "-g", "--gpu", help="enable gpu, disabled by default", default=False, is_flag=True ) -@click.option("-l", "--language", help="choose language (skips autodetection)") +@click.option("-l", "--language", help="language code eg. en/fr (skips autodetection)") @click.option("-d", "--debug", help="show debug logs", default=False, is_flag=True) @click.option("-s", "--stats", help="print stats", default=False, is_flag=True) @click.option("-q", "--quiet", help="no progress bar", default=False, is_flag=True)