Skip to content

Commit

Permalink
Removed force order and added ssl env
Browse files Browse the repository at this point in the history
  • Loading branch information
tmoroney committed Nov 26, 2024
1 parent e823a0d commit 58b3733
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Mac-Server/transcription-server.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import sys
import os
import appdirs
import certifi
os.environ['SSL_CERT_FILE'] = certifi.where()

class Unbuffered(object):
def __init__(self, stream):
Expand Down Expand Up @@ -158,7 +160,7 @@ def inference(audio, **kwargs) -> dict:

def transcribe_audio(audio_file, kwargs, max_words, max_chars):
print("Starting transcription...")
whisperResult = stable_whisper.transcribe_any(inference, audio_file, inference_kwargs = kwargs, vad=True, force_order=True)
whisperResult = stable_whisper.transcribe_any(inference, audio_file, inference_kwargs = kwargs, vad=True)
whisperResult.split_by_length(max_words=max_words, max_chars=max_chars)
return whisperResult.to_dict()

Expand Down

0 comments on commit 58b3733

Please sign in to comment.