mirror of
https://github.com/openai/whisper.git
synced 2025-11-24 06:26:03 +00:00
Update transcribe.py
Fixed comments
This commit is contained in:
parent
f3184f3829
commit
ce1b65e386
@ -47,6 +47,7 @@ def transcribe(
|
|||||||
no_speech_threshold: Optional[float] = 0.6,
|
no_speech_threshold: Optional[float] = 0.6,
|
||||||
condition_on_previous_text: bool = True,
|
condition_on_previous_text: bool = True,
|
||||||
initial_prompt: Optional[str] = None,
|
initial_prompt: Optional[str] = None,
|
||||||
|
carry_initial_prompt: bool = False,
|
||||||
word_timestamps: bool = False,
|
word_timestamps: bool = False,
|
||||||
prepend_punctuations: str = "\"'“¿([{-",
|
prepend_punctuations: str = "\"'“¿([{-",
|
||||||
append_punctuations: str = "\"'.。,,!!??::”)]}、",
|
append_punctuations: str = "\"'.。,,!!??::”)]}、",
|
||||||
@ -208,7 +209,7 @@ def transcribe(
|
|||||||
compression_ratio_threshold is not None
|
compression_ratio_threshold is not None
|
||||||
and decode_result.compression_ratio > compression_ratio_threshold
|
and decode_result.compression_ratio > compression_ratio_threshold
|
||||||
):
|
):
|
||||||
needs_fallback = True # too repetitive <-- We can inprove it...
|
needs_fallback = True # too repetitive
|
||||||
if (
|
if (
|
||||||
logprob_threshold is not None
|
logprob_threshold is not None
|
||||||
and decode_result.avg_logprob < logprob_threshold
|
and decode_result.avg_logprob < logprob_threshold
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user