mirror of
https://github.com/SYSTRAN/faster-whisper.git
synced 2026-01-09 21:48:08 -05:00
Run some automatic tests with GitHub Actions (#68)
This commit is contained in:
@@ -1,2 +1,9 @@
|
||||
from faster_whisper.audio import decode_audio
|
||||
from faster_whisper.transcribe import WhisperModel
|
||||
from faster_whisper.utils import format_timestamp
|
||||
|
||||
__all__ = [
|
||||
"decode_audio",
|
||||
"WhisperModel",
|
||||
"format_timestamp",
|
||||
]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import numpy as np
|
||||
|
||||
|
||||
# Adapted from https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/feature_extraction_whisper.py
|
||||
# Adapted from https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/feature_extraction_whisper.py # noqa: E501
|
||||
class FeatureExtractor:
|
||||
def __init__(
|
||||
self,
|
||||
|
||||
@@ -2,7 +2,7 @@ def format_timestamp(
|
||||
seconds: float,
|
||||
always_include_hours: bool = False,
|
||||
decimal_marker: str = ".",
|
||||
):
|
||||
) -> str:
|
||||
assert seconds >= 0, "non-negative timestamp expected"
|
||||
milliseconds = round(seconds * 1000.0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user