Skip to content

Commit

Permalink
Added log for transcription vocabulary
Browse files Browse the repository at this point in the history
  • Loading branch information
Jalaj-KT committed Aug 22, 2024
1 parent 34cc246 commit 4dd58ba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions soni_translate/speech_segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,9 @@ def transcribe_speech(

# https://github.com/openai/whisper/discussions/277
prompt = "以下是普通话的句子。" if SOURCE_LANGUAGE == "zh" else custom_vocab
SOURCE_LANGUAGE = (
SOURCE_LANGUAGE if SOURCE_LANGUAGE != "zh-TW" else "zh"
)
SOURCE_LANGUAGE = SOURCE_LANGUAGE if SOURCE_LANGUAGE != "zh-TW" else "zh"

logger.debug(f"transcription vocabulary: {prompt}, type: {type(prompt)}")
asr_options = {
"initial_prompt": prompt,
"suppress_numerals": literalize_numbers
Expand Down

0 comments on commit 4dd58ba

Please sign in to comment.