mirror of
https://github.com/macaodha/batdetect2.git
synced 2025-06-30 15:12:06 +02:00
Compare commits
1 Commits
db6f2b3fe8
...
39e358b5d8
Author | SHA1 | Date | |
---|---|---|---|
![]() |
39e358b5d8 |
@ -250,7 +250,7 @@ def process_file(
|
||||
model: DetectionModel = MODEL,
|
||||
config: Optional[ProcessingConfiguration] = None,
|
||||
device: torch.device = DEVICE,
|
||||
file_id: Optional[str] = None
|
||||
file_id: str | None = None
|
||||
) -> du.RunResults:
|
||||
"""Process audio file with model.
|
||||
|
||||
@ -286,7 +286,7 @@ def process_url(
|
||||
model: DetectionModel = MODEL,
|
||||
config: Optional[ProcessingConfiguration] = None,
|
||||
device: torch.device = DEVICE,
|
||||
file_id: Optional[str] = None
|
||||
file_id: str | None = None
|
||||
) -> du.RunResults:
|
||||
"""Process audio file with model.
|
||||
|
||||
|
@ -185,7 +185,7 @@ def load_audio_data(
|
||||
target_samp_rate: int,
|
||||
scale: bool = False,
|
||||
max_duration: Optional[float] = None,
|
||||
) -> Tuple[int, np.ndarray, Union[float, int]]:
|
||||
) -> Tuple[int, np.ndarray, int | float]:
|
||||
"""Load an audio file and resample it to the target sampling rate.
|
||||
|
||||
The audio is also scaled to [-1, 1] and clipped to the maximum duration.
|
||||
|
@ -742,7 +742,7 @@ def process_file(
|
||||
model: DetectionModel,
|
||||
config: ProcessingConfiguration,
|
||||
device: torch.device,
|
||||
file_id: Optional[str] = None
|
||||
file_id: str | None = None
|
||||
) -> Union[RunResults, Any]:
|
||||
"""Process a single audio file with detection model.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user