alphacep / alphacep/vosk-api

Can't open model with non-ascii path on Windows

Ouverte
#1,072 23 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Jupyter Notebook
Étoiles
15.1k
Forks
1.8k
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

Hi, when trying to create a model I'm having the following issue:

![image](https://user-images.githubusercontent.com/91077508/179131533-3488dc1b-bda0-4b3c-b340-3c60f17fe298.png)

I'm using Jupyter Notebook, here is my full code:

```
import ffmpeg
import subprocess
import os
import sys
from moviepy.editor import VideoFileClip
from vosk import Model, KaldiRecognizer
import pyaudio

base_dir = r'C:\Users\JoséRubenLoibman\Downloads\Python\Aulas\Video_to_Text'
base_dir = base_dir.replace("\\", "/") + "/"
mp4_file = base_dir + "Galina_Loibman_Tape1.mp4"
mp3_file = base_dir + "Galina_Loibman_Tape1.mp3"

def convert_video_to_audio_moviepy(video_file, output_ext="mp3"):
"""Converts video to audio using MoviePy library
that uses `ffmpeg` under the hood"""
filename, ext = os.path.splitext(video_file)
clip = VideoFileClip(video_file)
clip.audio.write_audiofile(f"{filename}.{output_ext}")

if __name__ == "__main__":
vf = sys.argv[1]
convert_video_to_audio_moviepy(mp4_file)

model = Model(lang = "ru")
```

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.