Skip to content

Commit

Permalink
Merge pull request #1 from Rumeysakeskin/Rumeysakeskin-patch-1
Browse files Browse the repository at this point in the history
add 'initial_prompt'
  • Loading branch information
Rumeysakeskin authored Jan 26, 2025
2 parents 36d2622 + 7fd2ef4 commit fba0ab0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions whisperx/asr.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,15 @@ def transcribe(
print_progress=False,
combined_progress=False,
verbose=False,
initial_prompt: Optional[str] = None,

) -> TranscriptionResult:
if isinstance(audio, str):
audio = load_audio(audio)

if initial_prompt is not None:
self.options = replace(self.options, initial_prompt=initial_prompt)

def data(audio, segments):
for seg in segments:
f1 = int(seg['start'] * SAMPLE_RATE)
Expand Down

0 comments on commit fba0ab0

Please sign in to comment.