estoy intentando transcribir el audio de un vídeo de youtube con la IA de whisper con el siguiente código:
import pytube
import whisper
youtubeUrl = "https://www.youtube.com/watch?v=a419iZMeN0o&ab_channel=SinEmbargoAlAire"
youtubeVideo = pytube.YouTube(youtubeUrl)
audio = youtubeVideo.streams.get_audio_only()
audio.download(filename='tmp.mp4')
model = whisper.load_model("small")
result = model.transcribe('tmp.mp4')
print(result['text'])
El problema es que me arroja el siguiente respuesta:
PSC:\Users\fenix.vscode>&C:/Users/fenix/AppData/Local/Programs/Python/Python310/python.exe"c:/Users/fenix/.vscode/import pytube.py" Traceback (most recent call last):
File "c:\Users\fenix.vscode\import pytube.py", line 2, in import whisper
File "C:\Users\fenix\AppData\Local\Programs\Python\Python310\lib\site-packages\whisper.py", line 69, in libc = ctypes.CDLL(libc_name)
File "C:\Users\fenix\AppData\Local\Programs\Python\Python310\lib\ctypes_init_.py", line 364, in init if '/' in name or '\' in name: TypeError: argument of type 'NoneType' is not iterable
¿Saben qué estoy haciendo mal? Ya instalé whisper, pytube, dentro de del GIT del chico menciona que también necesitas el ffmpeg, también lo instalé, aun que el ejemplo que vi no lo mencionaba.