Deux modifs (lien vers le modèle comme symlink vers un dossier 'model') #3

Open
symeon wants to merge 2 commits from symeon/transcription:master into master
1 changed files with 3 additions and 3 deletions
Showing only changes of commit b322a2b26e - Show all commits

View File

@ -7,8 +7,8 @@ import wave
SetLogLevel(0)
if not os.path.exists("models/fr"):
print ("Please download the model from https://alphacephei.com/vosk/models and unpack as 'models' in the current folder.")
if not os.path.exists("model"):
print ("Please download the model from https://alphacephei.com/vosk/models and unpack as 'model' in the current folder.")
exit (1)
wf = wave.open(sys.argv[1], "rb")
@ -16,7 +16,7 @@ if wf.getnchannels() != 1 or wf.getsampwidth() != 2 or wf.getcomptype() != "NONE
print ("Audio file must be WAV format mono PCM.")
exit (1)
model = Model("models/fr")
model = Model("model")
rec = KaldiRecognizer(model, wf.getframerate())
while True: