transcribe: document video support and shallow source lookup
Completes the video-source fix: the command help and README still promised a 25-message scan, and the low-confidence branch was missing the message provenance line the other replies carry.
This commit is contained in:
@@ -32,7 +32,7 @@ MAX_TRANSLATE_CHARS = 8000
|
||||
# send videos expecting them to be transcribed.
|
||||
MEDIA_EXTENSIONS = (
|
||||
".ogg", ".opus", ".wav", ".mp3", ".m4a", ".flac", ".aac", ".wma",
|
||||
".mp4", ".mov", ".m4v", ".mkv", ".webm", ".avi",
|
||||
".mp4", ".mov", ".m4v", ".mkv", ".webm", ".avi", ".mpeg", ".mpg",
|
||||
)
|
||||
|
||||
# Below this, Whisper is guessing which language it heard. Translating from a
|
||||
@@ -339,8 +339,8 @@ class Transcribe(commands.Cog):
|
||||
async def transcribe(self, ctx: commands.Context, *, language: Optional[str] = None):
|
||||
"""Transcribe a voice message, or translate it into another language.
|
||||
|
||||
Reply to a voice message, or just run it and the most recent one in the
|
||||
channel is used.
|
||||
Reply to a voice message or video, or attach one to the command. Running
|
||||
it bare uses the message posted immediately before it.
|
||||
|
||||
**Examples**
|
||||
`[p]transcribe` — transcribe and translate to English
|
||||
@@ -415,6 +415,7 @@ class Transcribe(commands.Cog):
|
||||
f"I only detected **{self._label(detected)}** "
|
||||
f"({confidence:.0%} confident), so I won't translate from a guess.\n"
|
||||
f"{self._clip(source_text, 1600)}"
|
||||
f"{origin}"
|
||||
)
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user