Skip to content

Commit

Permalink
doc: improve HF-related docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
hbredin committed Jan 27, 2025
1 parent 9cf27e6 commit fd91866
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 30 deletions.
4 changes: 2 additions & 2 deletions pyannote/audio/core/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ def expand_subfolders(
revision : str, optional
Revision when loading from the huggingface.co model hub.
token : str or bool, optional
Token to be used for the download.
Huggingface token to be used for downloading from Huggingface hub.
cache_dir: Path or str, optional
Path to the folder where cached files are stored.
Path to the folder where files downloaded from Huggingface hub are stored.
"""

if isinstance(config, dict):
Expand Down
4 changes: 2 additions & 2 deletions pyannote/audio/pipelines/multilabel.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ class MultiLabelSegmentation(Pipeline):
share_min_duration : bool, optional
If True, `min_duration_on` and `min_duration_off` are shared among labels.
token : str or bool, optional
Token to be used for the download.
Huggingface token to be used for downloading from Huggingface hub.
cache_dir: Path or str, optional
Path to the folder where cached files are stored.
Path to the folder where files downloaded from Huggingface hub are stored.
inference_kwargs : dict, optional
Keywords arguments passed to Inference.
Expand Down
4 changes: 2 additions & 2 deletions pyannote/audio/pipelines/overlapped_speech_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ class OverlappedSpeechDetection(Pipeline):
Optimize precision at target recall
Defaults to optimize precision/recall fscore
token : str or bool, optional
Token to be used for the download.
Huggingface token to be used for downloading from Huggingface hub.
cache_dir: Path or str, optional
Path to the folder where cached files are stored.
Path to the folder where files downloaded from Huggingface hub are stored.
inference_kwargs : dict, optional
Keywords arguments passed to Inference.
Expand Down
4 changes: 2 additions & 2 deletions pyannote/audio/pipelines/resegmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ class Resegmentation(SpeakerDiarizationMixin, Pipeline):
Defaults to {"collar": 0.0, "skip_overlap": False}. This is used in `get_metric`
when instantiating the metric: GreedyDiarizationErrorRate(**der_variant).
token : str or bool, optional
Token to be used for the download.
Huggingface token to be used for downloading from Huggingface hub.
cache_dir: Path or str, optional
Path to the folder where cached files are stored.
Path to the folder where files downloaded from Huggingface hub are stored.
Hyper-parameters
----------------
Expand Down
4 changes: 2 additions & 2 deletions pyannote/audio/pipelines/speaker_diarization.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ class SpeakerDiarization(SpeakerDiarizationMixin, Pipeline):
Defaults to {"collar": 0.0, "skip_overlap": False}. This is used in `get_metric`
when instantiating the metric: GreedyDiarizationErrorRate(**der_variant).
token : str or bool, optional
Token to be used for the download.
Huggingface token to be used for downloading from Huggingface hub.
cache_dir: Path or str, optional
Path to the folder where cached files are stored.
Path to the folder where files downloaded from Huggingface hub are stored.
Usage
-----
Expand Down
20 changes: 10 additions & 10 deletions pyannote/audio/pipelines/speaker_verification.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ class SpeechBrainPretrainedSpeakerEmbedding(BaseInference):
device : torch.device, optional
Device
token : str or bool, optional
Token to be used for the download.
Huggingface token to be used for downloading from Huggingface hub.
cache_dir: Path or str, optional
Path to the folder where cached files are stored.
Path to the folder where files downloaded from Huggingface hub are stored.
Usage
-----
Expand Down Expand Up @@ -393,9 +393,9 @@ class ONNXWeSpeakerPretrainedSpeakerEmbedding(BaseInference):
device : torch.device, optional
Device
token : str or bool, optional
Token to be used for the download.
Huggingface token to be used for downloading from Huggingface hub.
cache_dir: Path or str, optional
Path to the folder where cached files are stored.
Path to the folder where files downloaded from Huggingface hub are stored.
Usage
-----
Expand Down Expand Up @@ -629,9 +629,9 @@ class PyannoteAudioPretrainedSpeakerEmbedding(BaseInference):
device : torch.device, optional
Device
token : str or bool, optional
Token to be used for the download.
Huggingface token to be used for downloading from Huggingface hub.
cache_dir: Path or str, optional
Path to the folder where cached files are stored.
Path to the folder where files downloaded from Huggingface hub are stored.
Usage
-----
Expand Down Expand Up @@ -732,9 +732,9 @@ def PretrainedSpeakerEmbedding(
device : torch.device, optional
Device
token : str or bool, optional
Token to be used for the download.
Huggingface token to be used for downloading from Huggingface hub.
cache_dir: Path or str, optional
Path to the folder where cached files are stored.
Path to the folder where files downloaded from Huggingface hub are stored.
Usage
-----
Expand Down Expand Up @@ -794,9 +794,9 @@ class SpeakerEmbedding(Pipeline):
See pyannote.audio.pipelines.utils.get_model for supported format.
Defaults to no voice activity detection.
token : str or bool, optional
Token to be used for the download.
Huggingface token to be used for downloading from Huggingface hub.
cache_dir: Path or str, optional
Path to the folder where cached files are stored.
Path to the folder where files downloaded from Huggingface hub are stored.
Usage
-----
Expand Down
4 changes: 2 additions & 2 deletions pyannote/audio/pipelines/speech_separation.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ class SpeechSeparation(SpeakerDiarizationMixin, Pipeline):
Defaults to {"collar": 0.0, "skip_overlap": False}. This is used in `get_metric`
when instantiating the metric: GreedyDiarizationErrorRate(**der_variant).
token : str or bool, optional
Token to be used for the download.
Huggingface token to be used for downloading from Huggingface hub.
cache_dir: Path or str, optional
Path to the folder where cached files are stored.
Path to the folder where files downloaded from Huggingface hub are stored.
Usage
-----
Expand Down
8 changes: 4 additions & 4 deletions pyannote/audio/pipelines/utils/getter.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ def get_model(
pretrained model on Huggingface.co and loads with `Model.from_pretrained(model)`
When `dict`, loads with `Model.from_pretrained(**model)`.
token : str or bool, optional
Token to be used for the download.
Huggingface token to be used for downloading from Huggingface hub.
cache_dir: Path or str, optional
Path to the folder where cached files are stored.
Path to the folder where files downloaded from Huggingface hub are stored.
Returns
-------
Expand Down Expand Up @@ -117,9 +117,9 @@ def get_calibration(
pretrained calibration on Huggingface.co and loads with `Calibration.from_pretrained(calibration)`.
When `dict`, loads with `Calibration.from_pretrained(**calibration)`.
token : str or bool, optional
Token to be used for the download.
Huggingface token to be used for downloading from Huggingface hub.
cache_dir: Path or str, optional
Path to the folder where cached files are stored.
Path to the folder where files downloaded from Huggingface hub are stored.
Returns
-------
Expand Down
4 changes: 2 additions & 2 deletions pyannote/audio/pipelines/voice_activity_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ class VoiceActivityDetection(Pipeline):
Optimize (precision/recall) fscore. Defaults to optimizing detection
error rate.
token : str or bool, optional
Token to be used for the download.
Huggingface token to be used for downloading from Huggingface hub.
cache_dir: Path or str, optional
Path to the folder where cached files are stored.
Path to the folder where files downloaded from Huggingface hub are stored.
inference_kwargs : dict, optional
Keywords arguments passed to Inference.
Expand Down
4 changes: 2 additions & 2 deletions pyannote/audio/utils/hf_hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ def download_from_hf_hub(
subfolder : str, optional
Folder inside the model repo.
token : str or bool, optional
Token to be used for the download.
Huggingface token to be used for downloading from Huggingface hub.
cache_dir: Path or str, optional
Path to the folder where cached files are stored.
Path to the folder where files downloaded from Huggingface hub are stored.
See also
--------
Expand Down

0 comments on commit fd91866

Please sign in to comment.