Conversión de voz a texto y subtítulos

Después de renegar con herramientas de pago online, finalmente encontré una herramienta de código abierto y openai: https://github.com/openai/whisper Una de sus implementaciones se llama anaconda: https://repo.anaconda.com/archive/ Esta es la guia de instalación: https://www.linuxlinks.com/machine-learning-linux-whisper-automatic-speech-r... Yo opté por instalarlo en el home de usuario logueado con su en konsole: sh Anaconda3-2024.10-1-Linux-x86_64.sh Luego: $ conda create --name whisper $ conda activate whisper $ pipx install openai-whisper Con todo ello, debería quedar activado y "parado" en el directorio donde están los mp3 de audio a transcribir se ejecuta: $ whisper audio.mp3 --model medium --language Spanish Así por cada mp3. He probado el modelo large, pero tarda demasiado. Con el modelo medium, al 50% de uso de CPU global con Ryzen 5700X tarda aprox. 1,1 minutos por cada minuto de audio. La citada herramienta genera archivos .txt .srt .vtt y .tsv He encontrado la herramienta faster_whisper: https://software.opensuse.org//download.html?project=science%3Amachinelearni... python311-faster_whisper - Reimplementation of OpenAI's Whisper model using CTranslate2 faster-whisper is a reimplementation of OpenAI's Whisper model using CTranslate2, which is a fast inference engine for Transformer models. This implementation is up to 4 times faster than openai/whisper for the same accuracy while using less memory. The efficiency can be further improved with 8-bit quantization on both CPU and GPU. Elegí python311, porque es la misma versión que activó conda. Me queda por cambiar las variables de entorno para utilizar faster_whisper: //usr/lib/python3.11/site-packages/faster_whisper/transcribe.py la ruta del viejo instalado por pipx es: /home/usuario/.local/share/pipx/venvs/openai-whisper/lib64/python3.11/site-packages/whisper/transcribe.py Si alguien lo ha probado o quiere hacerlo, ¡bienvenido sea el aporte! Salu2 -- USA LINUX OPENSUSE QUE ES SOFTWARE LIBRE, NO NECESITAS PIRATEAR NADA Y NI TE VAS A PREOCUPAR MAS POR LOS VIRUS Y SPYWARES: http://www.opensuse.org/es/ Puedes visitar mi blog en: http://jerbes.blogspot.com.ar/

On 2024-12-16 12:48, Juan Erbes wrote:
Después de renegar con herramientas de pago online, finalmente encontré una herramienta de código abierto y openai:
...
Si alguien lo ha probado o quiere hacerlo, ¡bienvenido sea el aporte!
Vale, gracias. Ahora mismo no, pero queda apuntado. -- Cheers / Saludos, Carlos E. R. (from 15.5 x86_64 at Telcontar)

El lun, 16 dic 2024 a las 9:39, Carlos E. R. (<robin.listas@telefonica.net>) escribió:
On 2024-12-16 12:48, Juan Erbes wrote:
Después de renegar con herramientas de pago online, finalmente encontré una herramienta de código abierto y openai:
...
Si alguien lo ha probado o quiere hacerlo, ¡bienvenido sea el aporte!
Vale, gracias. Ahora mismo no, pero queda apuntado.
Uno de los detalles adicionales que ha podido observar es que openai-whisper (instalado mediante pipx) tiene habilitado la utilización de cuda: /.local/share/pipx/venvs/openai-whisper/lib/python3.11/site-packages> ls certifi llvmlite numpy.libs openai_whisper-20240930.dist-info torchgen certifi-2024.12.14.dist-info llvmlite-0.43.0.dist-info nvidia pipx_shared.pth tqdm charset_normalizer markupsafe nvidia_cublas_cu12-12.4.5.8.dist-info __pycache__ tqdm-4.67.1.dist-info charset_normalizer-3.4.0.dist-info MarkupSafe-3.0.2.dist-info nvidia_cuda_cupti_cu12-12.4.127.dist-info regex triton filelock more_itertools nvidia_cuda_nvrtc_cu12-12.4.127.dist-info regex-2024.11.6.dist-info triton-3.1.0.dist-info filelock-3.16.1.dist-info more_itertools-10.5.0.dist-info nvidia_cuda_runtime_cu12-12.4.127.dist-info requests typing_extensions-4.12.2.dist-info fsspec mpmath nvidia_cudnn_cu12-9.1.0.70.dist-info requests-2.32.3.dist-info typing_extensions.py fsspec-2024.10.0.dist-info mpmath-1.3.0.dist-info nvidia_cufft_cu12-11.2.1.3.dist-info sympy urllib3 functorch networkx nvidia_curand_cu12-10.3.5.147.dist-info sympy-1.13.1.dist-info urllib3-2.2.3.dist-info idna networkx-3.4.2.dist-info nvidia_cusolver_cu12-11.6.1.9.dist-info tiktoken whisper idna-3.10.dist-info numba nvidia_cusparse_cu12-12.3.1.170.dist-info tiktoken-0.8.0.dist-info isympy.py numba-0.60.0.dist-info nvidia_nccl_cu12-2.21.5.dist-info tiktoken_ext jinja2 numpy nvidia_nvjitlink_cu12-12.4.127.dist-info torch jinja2-3.1.4.dist-info numpy-2.0.2.dist-info nvidia_nvtx_cu12-12.4.127.dist-info torch-2.5.1.dist-info Pero como no toma las librerías de sistema y tengo una tarjeta de video AMD: pyvenv.cfg home = /usr/bin include-system-site-packages = false version = 3.11.11 executable = /usr/bin/python3.11 command = /usr/bin/python3.11 -m venv --clear /home/user/.local/share/pipx/shared No detecta que tengo Opencl instalado. Queda probar con faster_whisper. Salu2 -- USA LINUX OPENSUSE QUE ES SOFTWARE LIBRE, NO NECESITAS PIRATEAR NADA Y NI TE VAS A PREOCUPAR MAS POR LOS VIRUS Y SPYWARES: http://www.opensuse.org/es/ Puedes visitar mi blog en: http://jerbes.blogspot.com.ar/

El lun, 16 dic 2024 a las 10:20, Juan Erbes (<jerbes@gmail.com>) escribió:
El lun, 16 dic 2024 a las 9:39, Carlos E. R. (<robin.listas@telefonica.net>) escribió:
On 2024-12-16 12:48, Juan Erbes wrote:
Después de renegar con herramientas de pago online, finalmente encontré una herramienta de código abierto y openai:
...
Si alguien lo ha probado o quiere hacerlo, ¡bienvenido sea el aporte!
Vale, gracias. Ahora mismo no, pero queda apuntado.
Uno de los detalles adicionales que ha podido observar es que openai-whisper (instalado mediante pipx) tiene habilitado la utilización de cuda:
/.local/share/pipx/venvs/openai-whisper/lib/python3.11/site-packages> ls certifi llvmlite numpy.libs openai_whisper-20240930.dist-info torchgen certifi-2024.12.14.dist-info llvmlite-0.43.0.dist-info nvidia pipx_shared.pth tqdm charset_normalizer markupsafe nvidia_cublas_cu12-12.4.5.8.dist-info __pycache__ tqdm-4.67.1.dist-info charset_normalizer-3.4.0.dist-info MarkupSafe-3.0.2.dist-info nvidia_cuda_cupti_cu12-12.4.127.dist-info regex triton filelock more_itertools nvidia_cuda_nvrtc_cu12-12.4.127.dist-info regex-2024.11.6.dist-info triton-3.1.0.dist-info filelock-3.16.1.dist-info more_itertools-10.5.0.dist-info nvidia_cuda_runtime_cu12-12.4.127.dist-info requests typing_extensions-4.12.2.dist-info fsspec mpmath nvidia_cudnn_cu12-9.1.0.70.dist-info requests-2.32.3.dist-info typing_extensions.py fsspec-2024.10.0.dist-info mpmath-1.3.0.dist-info nvidia_cufft_cu12-11.2.1.3.dist-info sympy urllib3 functorch networkx nvidia_curand_cu12-10.3.5.147.dist-info sympy-1.13.1.dist-info urllib3-2.2.3.dist-info idna networkx-3.4.2.dist-info nvidia_cusolver_cu12-11.6.1.9.dist-info tiktoken whisper idna-3.10.dist-info numba nvidia_cusparse_cu12-12.3.1.170.dist-info tiktoken-0.8.0.dist-info isympy.py numba-0.60.0.dist-info nvidia_nccl_cu12-2.21.5.dist-info tiktoken_ext jinja2 numpy nvidia_nvjitlink_cu12-12.4.127.dist-info torch jinja2-3.1.4.dist-info numpy-2.0.2.dist-info nvidia_nvtx_cu12-12.4.127.dist-info torch-2.5.1.dist-info
Pero como no toma las librerías de sistema y tengo una tarjeta de video AMD: pyvenv.cfg home = /usr/bin include-system-site-packages = false version = 3.11.11 executable = /usr/bin/python3.11 command = /usr/bin/python3.11 -m venv --clear /home/user/.local/share/pipx/shared
No detecta que tengo Opencl instalado.
Queda probar con faster_whisper.
Desinstalé anaconda3 e instalé faster_whisper desde el repo: https://software.opensuse.org//download.html?project=science%3Amachinelearni... Pero tengo un problema con las variables de entorno, que las configura anaconda3. https://github.com/SYSTRAN/faster-whisper Instalé también con pipx install faster-whisper Creé el entorno con conda create --name faster-whisper Habilité el entorno con conda activate faster-whisper Reinicié, pero no encuentra la ruta del comando. Volví al lento whisper a secas. Salu2 -- USA LINUX OPENSUSE QUE ES SOFTWARE LIBRE, NO NECESITAS PIRATEAR NADA Y NI TE VAS A PREOCUPAR MAS POR LOS VIRUS Y SPYWARES: http://www.opensuse.org/es/ Puedes visitar mi blog en: http://jerbes.blogspot.com.ar/

El lun, 16 dic 2024 a las 12:22, Juan Erbes (<jerbes@gmail.com>) escribió:
El lun, 16 dic 2024 a las 10:20, Juan Erbes (<jerbes@gmail.com>) escribió:
El lun, 16 dic 2024 a las 9:39, Carlos E. R. (<robin.listas@telefonica.net>) escribió:
On 2024-12-16 12:48, Juan Erbes wrote:
Después de renegar con herramientas de pago online, finalmente encontré una herramienta de código abierto y openai:
...
Si alguien lo ha probado o quiere hacerlo, ¡bienvenido sea el aporte!
Vale, gracias. Ahora mismo no, pero queda apuntado.
Uno de los detalles adicionales que ha podido observar es que openai-whisper (instalado mediante pipx) tiene habilitado la utilización de cuda:
/.local/share/pipx/venvs/openai-whisper/lib/python3.11/site-packages> ls certifi llvmlite numpy.libs openai_whisper-20240930.dist-info torchgen certifi-2024.12.14.dist-info llvmlite-0.43.0.dist-info nvidia pipx_shared.pth tqdm charset_normalizer markupsafe nvidia_cublas_cu12-12.4.5.8.dist-info __pycache__ tqdm-4.67.1.dist-info charset_normalizer-3.4.0.dist-info MarkupSafe-3.0.2.dist-info nvidia_cuda_cupti_cu12-12.4.127.dist-info regex triton filelock more_itertools nvidia_cuda_nvrtc_cu12-12.4.127.dist-info regex-2024.11.6.dist-info triton-3.1.0.dist-info filelock-3.16.1.dist-info more_itertools-10.5.0.dist-info nvidia_cuda_runtime_cu12-12.4.127.dist-info requests typing_extensions-4.12.2.dist-info fsspec mpmath nvidia_cudnn_cu12-9.1.0.70.dist-info requests-2.32.3.dist-info typing_extensions.py fsspec-2024.10.0.dist-info mpmath-1.3.0.dist-info nvidia_cufft_cu12-11.2.1.3.dist-info sympy urllib3 functorch networkx nvidia_curand_cu12-10.3.5.147.dist-info sympy-1.13.1.dist-info urllib3-2.2.3.dist-info idna networkx-3.4.2.dist-info nvidia_cusolver_cu12-11.6.1.9.dist-info tiktoken whisper idna-3.10.dist-info numba nvidia_cusparse_cu12-12.3.1.170.dist-info tiktoken-0.8.0.dist-info isympy.py numba-0.60.0.dist-info nvidia_nccl_cu12-2.21.5.dist-info tiktoken_ext jinja2 numpy nvidia_nvjitlink_cu12-12.4.127.dist-info torch jinja2-3.1.4.dist-info numpy-2.0.2.dist-info nvidia_nvtx_cu12-12.4.127.dist-info torch-2.5.1.dist-info
Pero como no toma las librerías de sistema y tengo una tarjeta de video AMD: pyvenv.cfg home = /usr/bin include-system-site-packages = false version = 3.11.11 executable = /usr/bin/python3.11 command = /usr/bin/python3.11 -m venv --clear /home/user/.local/share/pipx/shared
No detecta que tengo Opencl instalado.
Queda probar con faster_whisper.
Desinstalé anaconda3 e instalé faster_whisper desde el repo: https://software.opensuse.org//download.html?project=science%3Amachinelearni...
Pero tengo un problema con las variables de entorno, que las configura anaconda3.
https://github.com/SYSTRAN/faster-whisper
Instalé también con pipx install faster-whisper
Creé el entorno con conda create --name faster-whisper Habilité el entorno con conda activate faster-whisper
Reinicié, pero no encuentra la ruta del comando.
Volví al lento whisper a secas.
Utilizando GPU AMD y CPU: El whispers original utiliza cuda y cpu, que en este último caso, el software intenta utilizar los registros FP16, pero la CPU los tiene como FP32 (unidad de procesamiento de punto flotante), consume una cantidad de recursos innecesarios, que hacen más lento que el procesamiento por faster-whisper. https://rocm.blogs.amd.com/artificial-intelligence/ctranslate2/README.html https://github.com/arlo-phoenix/CTranslate2-rocm Viendo el detalle del último, ya lo tenía instalado desde la web de software opensuse, y al agregar el sufijo para que instale las dependencias detectaba que estaba instalado en el sistema: pip install ctranslate2 --with-deps (creo que era así) Pero sigo sin poder ejecutarlo, a pesar de haber creado el entorno con coda (de anaconda3). Tal vez deba leer más detenidamente la documentación, que por cierto es bastante escasa: https://opennmt.net/CTranslate2/ De allí me manda a: https://opennmt.net/CTranslate2/speech_recognition.html Y desde allí me manda a: https://opennmt.net/CTranslate2/python/ctranslate2.models.Whisper.html Y también: https://opennmt.net/CTranslate2/guides/transformers.html#whisper Claramente la linea de comandos se complica y pasa a ser: ct2-transformers-converter --model openai/whisper-tiny --output_dir whisper-tiny-ct2 Algo de eso había probado, pero no encontraba la librería librosa: import ctranslate2 import librosa import transformers Al final del artículo cita: See the project faster-whisper for a complete transcription example using CTranslate2. https://github.com/SYSTRAN/faster-whisper Que es lo mismo que tenía instalado desde la web de software opensuse, pero no tengo una guia detallada de como se utiliza, ni de como crear las variables de entorno para ejecutarlo. Tal vez debe crear un script sh que diga /usr/bin/python3.11 transcribe.py (o el nombre del ejecutable principal). En el Readme del último link dice: https://github.com/SYSTRAN/faster-whisper#usage Realmente, de todo lo que aparece allí, no se cuales son definiciones de variables de entorno y parámetros a guardar en x archivos, y cual es la línea de comandos a utilizar. Luego aparece: https://github.com/SYSTRAN/faster-whisper#going-further Y allí aparece detallado transcribe.py https://github.com/SYSTRAN/faster-whisper/blob/master/faster_whisper/transcr... Que en sus 1.000 líneas muestra lo que hace. Si no me equivoco, es el mismo nombre de ejecutable Python que utiliza el whisper a secas. Tal vez pudiera probar a reemplazar todos los archivos *.py y librerías en el directorio de whispers por los de faster_whisper y ejecutarlo con el mismo comando whisper, pero debo ajustar los parámetros de la línea de comandos. Parece que "entré en un loop".... Y los parámetros de la línea de comandos, siguen sin aparecer... Salu2 -- USA LINUX OPENSUSE QUE ES SOFTWARE LIBRE, NO NECESITAS PIRATEAR NADA Y NI TE VAS A PREOCUPAR MAS POR LOS VIRUS Y SPYWARES: http://www.opensuse.org/es/ Puedes visitar mi blog en: http://jerbes.blogspot.com.ar/

El mar, 17 dic 2024 a las 10:40, Juan Erbes (<jerbes@gmail.com>) escribió:
El lun, 16 dic 2024 a las 12:22, Juan Erbes (<jerbes@gmail.com>) escribió:
El lun, 16 dic 2024 a las 10:20, Juan Erbes (<jerbes@gmail.com>) escribió:
El lun, 16 dic 2024 a las 9:39, Carlos E. R. (<robin.listas@telefonica.net>) escribió:
On 2024-12-16 12:48, Juan Erbes wrote:
Después de renegar con herramientas de pago online, finalmente encontré una herramienta de código abierto y openai:
...
Si alguien lo ha probado o quiere hacerlo, ¡bienvenido sea el aporte!
Vale, gracias. Ahora mismo no, pero queda apuntado.
Uno de los detalles adicionales que ha podido observar es que openai-whisper (instalado mediante pipx) tiene habilitado la utilización de cuda:
/.local/share/pipx/venvs/openai-whisper/lib/python3.11/site-packages> ls certifi llvmlite numpy.libs openai_whisper-20240930.dist-info torchgen certifi-2024.12.14.dist-info llvmlite-0.43.0.dist-info nvidia pipx_shared.pth tqdm charset_normalizer markupsafe nvidia_cublas_cu12-12.4.5.8.dist-info __pycache__ tqdm-4.67.1.dist-info charset_normalizer-3.4.0.dist-info MarkupSafe-3.0.2.dist-info nvidia_cuda_cupti_cu12-12.4.127.dist-info regex triton filelock more_itertools nvidia_cuda_nvrtc_cu12-12.4.127.dist-info regex-2024.11.6.dist-info triton-3.1.0.dist-info filelock-3.16.1.dist-info more_itertools-10.5.0.dist-info nvidia_cuda_runtime_cu12-12.4.127.dist-info requests typing_extensions-4.12.2.dist-info fsspec mpmath nvidia_cudnn_cu12-9.1.0.70.dist-info requests-2.32.3.dist-info typing_extensions.py fsspec-2024.10.0.dist-info mpmath-1.3.0.dist-info nvidia_cufft_cu12-11.2.1.3.dist-info sympy urllib3 functorch networkx nvidia_curand_cu12-10.3.5.147.dist-info sympy-1.13.1.dist-info urllib3-2.2.3.dist-info idna networkx-3.4.2.dist-info nvidia_cusolver_cu12-11.6.1.9.dist-info tiktoken whisper idna-3.10.dist-info numba nvidia_cusparse_cu12-12.3.1.170.dist-info tiktoken-0.8.0.dist-info isympy.py numba-0.60.0.dist-info nvidia_nccl_cu12-2.21.5.dist-info tiktoken_ext jinja2 numpy nvidia_nvjitlink_cu12-12.4.127.dist-info torch jinja2-3.1.4.dist-info numpy-2.0.2.dist-info nvidia_nvtx_cu12-12.4.127.dist-info torch-2.5.1.dist-info
Pero como no toma las librerías de sistema y tengo una tarjeta de video AMD: pyvenv.cfg home = /usr/bin include-system-site-packages = false version = 3.11.11 executable = /usr/bin/python3.11 command = /usr/bin/python3.11 -m venv --clear /home/user/.local/share/pipx/shared
No detecta que tengo Opencl instalado.
Queda probar con faster_whisper.
Desinstalé anaconda3 e instalé faster_whisper desde el repo: https://software.opensuse.org//download.html?project=science%3Amachinelearni...
Pero tengo un problema con las variables de entorno, que las configura anaconda3.
https://github.com/SYSTRAN/faster-whisper
Instalé también con pipx install faster-whisper
Creé el entorno con conda create --name faster-whisper Habilité el entorno con conda activate faster-whisper
Reinicié, pero no encuentra la ruta del comando.
Volví al lento whisper a secas.
Utilizando GPU AMD y CPU: El whispers original utiliza cuda y cpu, que en este último caso, el software intenta utilizar los registros FP16, pero la CPU los tiene como FP32 (unidad de procesamiento de punto flotante), consume una cantidad de recursos innecesarios, que hacen más lento que el procesamiento por faster-whisper. https://rocm.blogs.amd.com/artificial-intelligence/ctranslate2/README.html
https://github.com/arlo-phoenix/CTranslate2-rocm
Viendo el detalle del último, ya lo tenía instalado desde la web de software opensuse, y al agregar el sufijo para que instale las dependencias detectaba que estaba instalado en el sistema:
pip install ctranslate2 --with-deps (creo que era así)
Pero sigo sin poder ejecutarlo, a pesar de haber creado el entorno con coda (de anaconda3).
Tal vez deba leer más detenidamente la documentación, que por cierto es bastante escasa: https://opennmt.net/CTranslate2/
De allí me manda a: https://opennmt.net/CTranslate2/speech_recognition.html
Y desde allí me manda a: https://opennmt.net/CTranslate2/python/ctranslate2.models.Whisper.html
Y también: https://opennmt.net/CTranslate2/guides/transformers.html#whisper
Claramente la linea de comandos se complica y pasa a ser:
ct2-transformers-converter --model openai/whisper-tiny --output_dir whisper-tiny-ct2
Algo de eso había probado, pero no encontraba la librería librosa:
import ctranslate2 import librosa import transformers
Al final del artículo cita: See the project faster-whisper for a complete transcription example using CTranslate2. https://github.com/SYSTRAN/faster-whisper
Que es lo mismo que tenía instalado desde la web de software opensuse, pero no tengo una guia detallada de como se utiliza, ni de como crear las variables de entorno para ejecutarlo. Tal vez debe crear un script sh que diga /usr/bin/python3.11 transcribe.py (o el nombre del ejecutable principal).
En el Readme del último link dice: https://github.com/SYSTRAN/faster-whisper#usage
Realmente, de todo lo que aparece allí, no se cuales son definiciones de variables de entorno y parámetros a guardar en x archivos, y cual es la línea de comandos a utilizar.
Luego aparece: https://github.com/SYSTRAN/faster-whisper#going-further
Y allí aparece detallado transcribe.py https://github.com/SYSTRAN/faster-whisper/blob/master/faster_whisper/transcr...
Que en sus 1.000 líneas muestra lo que hace. Si no me equivoco, es el mismo nombre de ejecutable Python que utiliza el whisper a secas. Tal vez pudiera probar a reemplazar todos los archivos *.py y librerías en el directorio de whispers por los de faster_whisper y ejecutarlo con el mismo comando whisper, pero debo ajustar los parámetros de la línea de comandos.
Finalmente, he encontrado algo que voy a probar por la tarde de sudamérica: https://registry.hub.docker.com/r/beecave/insanely-fast-whisper-rocm https://registry.hub.docker.com/layers/beecave/insanely-fast-whisper-rocm/ma... https://github.com/Vaibhavs10/insanely-fast-whisper https://github.com/ochen1/insanely-fast-whisper-cli https://github.com/Vaibhavs10/insanely-fast-whisper Insanely Fast Whisper https://www.youtube.com/watch?v=e1pmV8l7uLs Salu2 -- USA LINUX OPENSUSE QUE ES SOFTWARE LIBRE, NO NECESITAS PIRATEAR NADA Y NI TE VAS A PREOCUPAR MAS POR LOS VIRUS Y SPYWARES: http://www.opensuse.org/es/ Puedes visitar mi blog en: http://jerbes.blogspot.com.ar/

El mar, 17 dic 2024 a las 12:10, Juan Erbes (<jerbes@gmail.com>) escribió:
El mar, 17 dic 2024 a las 10:40, Juan Erbes (<jerbes@gmail.com>) escribió:
El lun, 16 dic 2024 a las 12:22, Juan Erbes (<jerbes@gmail.com>) escribió:
El lun, 16 dic 2024 a las 10:20, Juan Erbes (<jerbes@gmail.com>) escribió:
El lun, 16 dic 2024 a las 9:39, Carlos E. R. (<robin.listas@telefonica.net>) escribió:
On 2024-12-16 12:48, Juan Erbes wrote:
Después de renegar con herramientas de pago online, finalmente encontré una herramienta de código abierto y openai:
...
Si alguien lo ha probado o quiere hacerlo, ¡bienvenido sea el aporte!
Vale, gracias. Ahora mismo no, pero queda apuntado.
Uno de los detalles adicionales que ha podido observar es que openai-whisper (instalado mediante pipx) tiene habilitado la utilización de cuda:
/.local/share/pipx/venvs/openai-whisper/lib/python3.11/site-packages> ls certifi llvmlite numpy.libs openai_whisper-20240930.dist-info torchgen certifi-2024.12.14.dist-info llvmlite-0.43.0.dist-info nvidia pipx_shared.pth tqdm charset_normalizer markupsafe nvidia_cublas_cu12-12.4.5.8.dist-info __pycache__ tqdm-4.67.1.dist-info charset_normalizer-3.4.0.dist-info MarkupSafe-3.0.2.dist-info nvidia_cuda_cupti_cu12-12.4.127.dist-info regex triton filelock more_itertools nvidia_cuda_nvrtc_cu12-12.4.127.dist-info regex-2024.11.6.dist-info triton-3.1.0.dist-info filelock-3.16.1.dist-info more_itertools-10.5.0.dist-info nvidia_cuda_runtime_cu12-12.4.127.dist-info requests typing_extensions-4.12.2.dist-info fsspec mpmath nvidia_cudnn_cu12-9.1.0.70.dist-info requests-2.32.3.dist-info typing_extensions.py fsspec-2024.10.0.dist-info mpmath-1.3.0.dist-info nvidia_cufft_cu12-11.2.1.3.dist-info sympy urllib3 functorch networkx nvidia_curand_cu12-10.3.5.147.dist-info sympy-1.13.1.dist-info urllib3-2.2.3.dist-info idna networkx-3.4.2.dist-info nvidia_cusolver_cu12-11.6.1.9.dist-info tiktoken whisper idna-3.10.dist-info numba nvidia_cusparse_cu12-12.3.1.170.dist-info tiktoken-0.8.0.dist-info isympy.py numba-0.60.0.dist-info nvidia_nccl_cu12-2.21.5.dist-info tiktoken_ext jinja2 numpy nvidia_nvjitlink_cu12-12.4.127.dist-info torch jinja2-3.1.4.dist-info numpy-2.0.2.dist-info nvidia_nvtx_cu12-12.4.127.dist-info torch-2.5.1.dist-info
Pero como no toma las librerías de sistema y tengo una tarjeta de video AMD: pyvenv.cfg home = /usr/bin include-system-site-packages = false version = 3.11.11 executable = /usr/bin/python3.11 command = /usr/bin/python3.11 -m venv --clear /home/user/.local/share/pipx/shared
No detecta que tengo Opencl instalado.
Queda probar con faster_whisper.
Desinstalé anaconda3 e instalé faster_whisper desde el repo: https://software.opensuse.org//download.html?project=science%3Amachinelearni...
Pero tengo un problema con las variables de entorno, que las configura anaconda3.
https://github.com/SYSTRAN/faster-whisper
Instalé también con pipx install faster-whisper
Creé el entorno con conda create --name faster-whisper Habilité el entorno con conda activate faster-whisper
Reinicié, pero no encuentra la ruta del comando.
Volví al lento whisper a secas.
Utilizando GPU AMD y CPU: El whispers original utiliza cuda y cpu, que en este último caso, el software intenta utilizar los registros FP16, pero la CPU los tiene como FP32 (unidad de procesamiento de punto flotante), consume una cantidad de recursos innecesarios, que hacen más lento que el procesamiento por faster-whisper. https://rocm.blogs.amd.com/artificial-intelligence/ctranslate2/README.html
https://github.com/arlo-phoenix/CTranslate2-rocm
Viendo el detalle del último, ya lo tenía instalado desde la web de software opensuse, y al agregar el sufijo para que instale las dependencias detectaba que estaba instalado en el sistema:
pip install ctranslate2 --with-deps (creo que era así)
Pero sigo sin poder ejecutarlo, a pesar de haber creado el entorno con coda (de anaconda3).
Tal vez deba leer más detenidamente la documentación, que por cierto es bastante escasa: https://opennmt.net/CTranslate2/
De allí me manda a: https://opennmt.net/CTranslate2/speech_recognition.html
Y desde allí me manda a: https://opennmt.net/CTranslate2/python/ctranslate2.models.Whisper.html
Y también: https://opennmt.net/CTranslate2/guides/transformers.html#whisper
Claramente la linea de comandos se complica y pasa a ser:
ct2-transformers-converter --model openai/whisper-tiny --output_dir whisper-tiny-ct2
Algo de eso había probado, pero no encontraba la librería librosa:
import ctranslate2 import librosa import transformers
Al final del artículo cita: See the project faster-whisper for a complete transcription example using CTranslate2. https://github.com/SYSTRAN/faster-whisper
Que es lo mismo que tenía instalado desde la web de software opensuse, pero no tengo una guia detallada de como se utiliza, ni de como crear las variables de entorno para ejecutarlo. Tal vez debe crear un script sh que diga /usr/bin/python3.11 transcribe.py (o el nombre del ejecutable principal).
En el Readme del último link dice: https://github.com/SYSTRAN/faster-whisper#usage
Realmente, de todo lo que aparece allí, no se cuales son definiciones de variables de entorno y parámetros a guardar en x archivos, y cual es la línea de comandos a utilizar.
Luego aparece: https://github.com/SYSTRAN/faster-whisper#going-further
Y allí aparece detallado transcribe.py https://github.com/SYSTRAN/faster-whisper/blob/master/faster_whisper/transcr...
Que en sus 1.000 líneas muestra lo que hace. Si no me equivoco, es el mismo nombre de ejecutable Python que utiliza el whisper a secas. Tal vez pudiera probar a reemplazar todos los archivos *.py y librerías en el directorio de whispers por los de faster_whisper y ejecutarlo con el mismo comando whisper, pero debo ajustar los parámetros de la línea de comandos.
Finalmente, he encontrado algo que voy a probar por la tarde de sudamérica:
https://registry.hub.docker.com/r/beecave/insanely-fast-whisper-rocm
https://registry.hub.docker.com/layers/beecave/insanely-fast-whisper-rocm/ma...
https://github.com/Vaibhavs10/insanely-fast-whisper
https://github.com/ochen1/insanely-fast-whisper-cli
https://github.com/Vaibhavs10/insanely-fast-whisper
Insanely Fast Whisper https://www.youtube.com/watch?v=e1pmV8l7uLs
Finalmente, he optado por eliminar anaconda3 y previamente sus seteos . Para no meterme con docker: https://www.docker.com/ Opté por instalar la versión de: https://github.com/Vaibhavs10/insanely-fast-whisper Con pipx install insanely-fast-whisper --force --pip-args="--ignore-requires-python" Funciona: $insanely-fast-whisper --model-name distil-whisper/large-v2 --file-name archivo.mp3 config.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.29k/2.29k [00:00<00:00, 26.4MB/s] model.safetensors: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.51G/1.51G [00:42<00:00, 35.9MB/s] generation_config.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.62k/3.62k [00:00<00:00, 41.6MB/s] tokenizer_config.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 283k/283k [00:00<00:00, 1.02MB/s] vocab.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 836k/836k [00:00<00:00, 1.98MB/s] tokenizer.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.48M/2.48M [00:00<00:00, 4.29MB/s] merges.txt: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 494k/494k [00:00<00:00, 1.76MB/s] normalizer.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 52.7k/52.7k [00:00<00:00, 271MB/s] added_tokens.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 34.6k/34.6k [00:00<00:00, 135MB/s] special_tokens_map.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.08k/2.08k [00:00<00:00, 25.0MB/s] preprocessor_config.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 339/339 [00:00<00:00, 4.37MB/s] Device set to use cuda:0 Traceback (most recent call last): Varias lineas de error y termina con: RuntimeError: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx Próximo paso: instalar ZLUDA: https://github.com/vosen/ZLUDA https://www.phoronix.com/news/ZLUDA-Third-Life Salu2 -- USA LINUX OPENSUSE QUE ES SOFTWARE LIBRE, NO NECESITAS PIRATEAR NADA Y NI TE VAS A PREOCUPAR MAS POR LOS VIRUS Y SPYWARES: http://www.opensuse.org/es/ Puedes visitar mi blog en: http://jerbes.blogspot.com.ar/

El mar, 17 dic 2024 a las 19:25, Juan Erbes (<jerbes@gmail.com>) escribió:
El mar, 17 dic 2024 a las 12:10, Juan Erbes (<jerbes@gmail.com>) escribió:
El mar, 17 dic 2024 a las 10:40, Juan Erbes (<jerbes@gmail.com>) escribió:
El lun, 16 dic 2024 a las 12:22, Juan Erbes (<jerbes@gmail.com>) escribió:
El lun, 16 dic 2024 a las 10:20, Juan Erbes (<jerbes@gmail.com>) escribió:
El lun, 16 dic 2024 a las 9:39, Carlos E. R. (<robin.listas@telefonica.net>) escribió:
On 2024-12-16 12:48, Juan Erbes wrote: > Después de renegar con herramientas de pago online, finalmente > encontré una herramienta de código abierto y openai:
...
> Si alguien lo ha probado o quiere hacerlo, ¡bienvenido sea el aporte!
Vale, gracias. Ahora mismo no, pero queda apuntado.
Uno de los detalles adicionales que ha podido observar es que openai-whisper (instalado mediante pipx) tiene habilitado la utilización de cuda:
/.local/share/pipx/venvs/openai-whisper/lib/python3.11/site-packages> ls certifi llvmlite numpy.libs openai_whisper-20240930.dist-info torchgen certifi-2024.12.14.dist-info llvmlite-0.43.0.dist-info nvidia pipx_shared.pth tqdm charset_normalizer markupsafe nvidia_cublas_cu12-12.4.5.8.dist-info __pycache__ tqdm-4.67.1.dist-info charset_normalizer-3.4.0.dist-info MarkupSafe-3.0.2.dist-info nvidia_cuda_cupti_cu12-12.4.127.dist-info regex triton filelock more_itertools nvidia_cuda_nvrtc_cu12-12.4.127.dist-info regex-2024.11.6.dist-info triton-3.1.0.dist-info filelock-3.16.1.dist-info more_itertools-10.5.0.dist-info nvidia_cuda_runtime_cu12-12.4.127.dist-info requests typing_extensions-4.12.2.dist-info fsspec mpmath nvidia_cudnn_cu12-9.1.0.70.dist-info requests-2.32.3.dist-info typing_extensions.py fsspec-2024.10.0.dist-info mpmath-1.3.0.dist-info nvidia_cufft_cu12-11.2.1.3.dist-info sympy urllib3 functorch networkx nvidia_curand_cu12-10.3.5.147.dist-info sympy-1.13.1.dist-info urllib3-2.2.3.dist-info idna networkx-3.4.2.dist-info nvidia_cusolver_cu12-11.6.1.9.dist-info tiktoken whisper idna-3.10.dist-info numba nvidia_cusparse_cu12-12.3.1.170.dist-info tiktoken-0.8.0.dist-info isympy.py numba-0.60.0.dist-info nvidia_nccl_cu12-2.21.5.dist-info tiktoken_ext jinja2 numpy nvidia_nvjitlink_cu12-12.4.127.dist-info torch jinja2-3.1.4.dist-info numpy-2.0.2.dist-info nvidia_nvtx_cu12-12.4.127.dist-info torch-2.5.1.dist-info
Pero como no toma las librerías de sistema y tengo una tarjeta de video AMD: pyvenv.cfg home = /usr/bin include-system-site-packages = false version = 3.11.11 executable = /usr/bin/python3.11 command = /usr/bin/python3.11 -m venv --clear /home/user/.local/share/pipx/shared
No detecta que tengo Opencl instalado.
Queda probar con faster_whisper.
Desinstalé anaconda3 e instalé faster_whisper desde el repo: https://software.opensuse.org//download.html?project=science%3Amachinelearni...
Pero tengo un problema con las variables de entorno, que las configura anaconda3.
https://github.com/SYSTRAN/faster-whisper
Instalé también con pipx install faster-whisper
Creé el entorno con conda create --name faster-whisper Habilité el entorno con conda activate faster-whisper
Reinicié, pero no encuentra la ruta del comando.
Volví al lento whisper a secas.
Utilizando GPU AMD y CPU: El whispers original utiliza cuda y cpu, que en este último caso, el software intenta utilizar los registros FP16, pero la CPU los tiene como FP32 (unidad de procesamiento de punto flotante), consume una cantidad de recursos innecesarios, que hacen más lento que el procesamiento por faster-whisper. https://rocm.blogs.amd.com/artificial-intelligence/ctranslate2/README.html
https://github.com/arlo-phoenix/CTranslate2-rocm
Viendo el detalle del último, ya lo tenía instalado desde la web de software opensuse, y al agregar el sufijo para que instale las dependencias detectaba que estaba instalado en el sistema:
pip install ctranslate2 --with-deps (creo que era así)
Pero sigo sin poder ejecutarlo, a pesar de haber creado el entorno con coda (de anaconda3).
Tal vez deba leer más detenidamente la documentación, que por cierto es bastante escasa: https://opennmt.net/CTranslate2/
De allí me manda a: https://opennmt.net/CTranslate2/speech_recognition.html
Y desde allí me manda a: https://opennmt.net/CTranslate2/python/ctranslate2.models.Whisper.html
Y también: https://opennmt.net/CTranslate2/guides/transformers.html#whisper
Claramente la linea de comandos se complica y pasa a ser:
ct2-transformers-converter --model openai/whisper-tiny --output_dir whisper-tiny-ct2
Algo de eso había probado, pero no encontraba la librería librosa:
import ctranslate2 import librosa import transformers
Al final del artículo cita: See the project faster-whisper for a complete transcription example using CTranslate2. https://github.com/SYSTRAN/faster-whisper
Que es lo mismo que tenía instalado desde la web de software opensuse, pero no tengo una guia detallada de como se utiliza, ni de como crear las variables de entorno para ejecutarlo. Tal vez debe crear un script sh que diga /usr/bin/python3.11 transcribe.py (o el nombre del ejecutable principal).
En el Readme del último link dice: https://github.com/SYSTRAN/faster-whisper#usage
Realmente, de todo lo que aparece allí, no se cuales son definiciones de variables de entorno y parámetros a guardar en x archivos, y cual es la línea de comandos a utilizar.
Luego aparece: https://github.com/SYSTRAN/faster-whisper#going-further
Y allí aparece detallado transcribe.py https://github.com/SYSTRAN/faster-whisper/blob/master/faster_whisper/transcr...
Que en sus 1.000 líneas muestra lo que hace. Si no me equivoco, es el mismo nombre de ejecutable Python que utiliza el whisper a secas. Tal vez pudiera probar a reemplazar todos los archivos *.py y librerías en el directorio de whispers por los de faster_whisper y ejecutarlo con el mismo comando whisper, pero debo ajustar los parámetros de la línea de comandos.
Finalmente, he encontrado algo que voy a probar por la tarde de sudamérica:
https://registry.hub.docker.com/r/beecave/insanely-fast-whisper-rocm
https://registry.hub.docker.com/layers/beecave/insanely-fast-whisper-rocm/ma...
https://github.com/Vaibhavs10/insanely-fast-whisper
https://github.com/ochen1/insanely-fast-whisper-cli
https://github.com/Vaibhavs10/insanely-fast-whisper
Insanely Fast Whisper https://www.youtube.com/watch?v=e1pmV8l7uLs
Finalmente, he optado por eliminar anaconda3 y previamente sus seteos .
Para no meterme con docker: https://www.docker.com/
Opté por instalar la versión de: https://github.com/Vaibhavs10/insanely-fast-whisper
Con
pipx install insanely-fast-whisper --force --pip-args="--ignore-requires-python"
Funciona: $insanely-fast-whisper --model-name distil-whisper/large-v2 --file-name archivo.mp3 config.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.29k/2.29k [00:00<00:00, 26.4MB/s] model.safetensors: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.51G/1.51G [00:42<00:00, 35.9MB/s] generation_config.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.62k/3.62k [00:00<00:00, 41.6MB/s] tokenizer_config.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 283k/283k [00:00<00:00, 1.02MB/s] vocab.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 836k/836k [00:00<00:00, 1.98MB/s] tokenizer.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.48M/2.48M [00:00<00:00, 4.29MB/s] merges.txt: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 494k/494k [00:00<00:00, 1.76MB/s] normalizer.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 52.7k/52.7k [00:00<00:00, 271MB/s] added_tokens.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 34.6k/34.6k [00:00<00:00, 135MB/s] special_tokens_map.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.08k/2.08k [00:00<00:00, 25.0MB/s] preprocessor_config.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 339/339 [00:00<00:00, 4.37MB/s] Device set to use cuda:0 Traceback (most recent call last): Varias lineas de error y termina con: RuntimeError: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx
Próximo paso: instalar ZLUDA: https://github.com/vosen/ZLUDA
Lamentablemente la compilación con Rust de ZLUDA falla: Compiling ptx v0.0.0 (/home/jerbes/bin/ZLUDA/ptx) error[E0599]: no variant or associated item named `NVML_ERROR_NOT_SUPPORTED` found for enum `Result` in the current scope --> zluda_ml/src/impl.rs:11:19 | 11 | nvmlReturn_t::NVML_ERROR_NOT_SUPPORTED | ^^^^^^^^^^^^^^^^^^^^^^^^ variant or associated item not found in `Result<(), nvmlError_t>` | help: there is an associated constant `ERROR_NOT_SUPPORTED` with a similar name | 11 | nvmlReturn_t::ERROR_NOT_SUPPORTED | ~~~~~~~~~~~~~~~~~~~ For more information about this error, try `rustc --explain E0599`. error: could not compile `zluda_ml` (lib) due to 1 previous error warning: build failed, waiting for other jobs to finish... Por ahora solo puedo seguir utilizando el primer whisper. Tengo que volver a intentar con faster-whisper Salu2 -- USA LINUX OPENSUSE QUE ES SOFTWARE LIBRE, NO NECESITAS PIRATEAR NADA Y NI TE VAS A PREOCUPAR MAS POR LOS VIRUS Y SPYWARES: http://www.opensuse.org/es/ Puedes visitar mi blog en: http://jerbes.blogspot.com.ar/

El mié, 18 dic 2024 a las 8:30, Juan Erbes (<jerbes@gmail.com>) escribió:
El mar, 17 dic 2024 a las 19:25, Juan Erbes (<jerbes@gmail.com>) escribió:
El mar, 17 dic 2024 a las 12:10, Juan Erbes (<jerbes@gmail.com>) escribió:
El mar, 17 dic 2024 a las 10:40, Juan Erbes (<jerbes@gmail.com>) escribió:
El lun, 16 dic 2024 a las 12:22, Juan Erbes (<jerbes@gmail.com>) escribió:
El lun, 16 dic 2024 a las 10:20, Juan Erbes (<jerbes@gmail.com>) escribió:
El lun, 16 dic 2024 a las 9:39, Carlos E. R. (<robin.listas@telefonica.net>) escribió: > > On 2024-12-16 12:48, Juan Erbes wrote: > > Después de renegar con herramientas de pago online, finalmente > > encontré una herramienta de código abierto y openai: > > ... > > > > Si alguien lo ha probado o quiere hacerlo, ¡bienvenido sea el aporte! > > Vale, gracias. Ahora mismo no, pero queda apuntado.
Uno de los detalles adicionales que ha podido observar es que openai-whisper (instalado mediante pipx) tiene habilitado la utilización de cuda:
/.local/share/pipx/venvs/openai-whisper/lib/python3.11/site-packages> ls certifi llvmlite numpy.libs openai_whisper-20240930.dist-info torchgen certifi-2024.12.14.dist-info llvmlite-0.43.0.dist-info nvidia pipx_shared.pth tqdm charset_normalizer markupsafe nvidia_cublas_cu12-12.4.5.8.dist-info __pycache__ tqdm-4.67.1.dist-info charset_normalizer-3.4.0.dist-info MarkupSafe-3.0.2.dist-info nvidia_cuda_cupti_cu12-12.4.127.dist-info regex triton filelock more_itertools nvidia_cuda_nvrtc_cu12-12.4.127.dist-info regex-2024.11.6.dist-info triton-3.1.0.dist-info filelock-3.16.1.dist-info more_itertools-10.5.0.dist-info nvidia_cuda_runtime_cu12-12.4.127.dist-info requests typing_extensions-4.12.2.dist-info fsspec mpmath nvidia_cudnn_cu12-9.1.0.70.dist-info requests-2.32.3.dist-info typing_extensions.py fsspec-2024.10.0.dist-info mpmath-1.3.0.dist-info nvidia_cufft_cu12-11.2.1.3.dist-info sympy urllib3 functorch networkx nvidia_curand_cu12-10.3.5.147.dist-info sympy-1.13.1.dist-info urllib3-2.2.3.dist-info idna networkx-3.4.2.dist-info nvidia_cusolver_cu12-11.6.1.9.dist-info tiktoken whisper idna-3.10.dist-info numba nvidia_cusparse_cu12-12.3.1.170.dist-info tiktoken-0.8.0.dist-info isympy.py numba-0.60.0.dist-info nvidia_nccl_cu12-2.21.5.dist-info tiktoken_ext jinja2 numpy nvidia_nvjitlink_cu12-12.4.127.dist-info torch jinja2-3.1.4.dist-info numpy-2.0.2.dist-info nvidia_nvtx_cu12-12.4.127.dist-info torch-2.5.1.dist-info
Pero como no toma las librerías de sistema y tengo una tarjeta de video AMD: pyvenv.cfg home = /usr/bin include-system-site-packages = false version = 3.11.11 executable = /usr/bin/python3.11 command = /usr/bin/python3.11 -m venv --clear /home/user/.local/share/pipx/shared
No detecta que tengo Opencl instalado.
Queda probar con faster_whisper.
Desinstalé anaconda3 e instalé faster_whisper desde el repo: https://software.opensuse.org//download.html?project=science%3Amachinelearni...
Pero tengo un problema con las variables de entorno, que las configura anaconda3.
https://github.com/SYSTRAN/faster-whisper
Instalé también con pipx install faster-whisper
Creé el entorno con conda create --name faster-whisper Habilité el entorno con conda activate faster-whisper
Reinicié, pero no encuentra la ruta del comando.
Volví al lento whisper a secas.
Utilizando GPU AMD y CPU: El whispers original utiliza cuda y cpu, que en este último caso, el software intenta utilizar los registros FP16, pero la CPU los tiene como FP32 (unidad de procesamiento de punto flotante), consume una cantidad de recursos innecesarios, que hacen más lento que el procesamiento por faster-whisper. https://rocm.blogs.amd.com/artificial-intelligence/ctranslate2/README.html
https://github.com/arlo-phoenix/CTranslate2-rocm
Viendo el detalle del último, ya lo tenía instalado desde la web de software opensuse, y al agregar el sufijo para que instale las dependencias detectaba que estaba instalado en el sistema:
pip install ctranslate2 --with-deps (creo que era así)
Pero sigo sin poder ejecutarlo, a pesar de haber creado el entorno con coda (de anaconda3).
Tal vez deba leer más detenidamente la documentación, que por cierto es bastante escasa: https://opennmt.net/CTranslate2/
De allí me manda a: https://opennmt.net/CTranslate2/speech_recognition.html
Y desde allí me manda a: https://opennmt.net/CTranslate2/python/ctranslate2.models.Whisper.html
Y también: https://opennmt.net/CTranslate2/guides/transformers.html#whisper
Claramente la linea de comandos se complica y pasa a ser:
ct2-transformers-converter --model openai/whisper-tiny --output_dir whisper-tiny-ct2
Algo de eso había probado, pero no encontraba la librería librosa:
import ctranslate2 import librosa import transformers
Al final del artículo cita: See the project faster-whisper for a complete transcription example using CTranslate2. https://github.com/SYSTRAN/faster-whisper
Que es lo mismo que tenía instalado desde la web de software opensuse, pero no tengo una guia detallada de como se utiliza, ni de como crear las variables de entorno para ejecutarlo. Tal vez debe crear un script sh que diga /usr/bin/python3.11 transcribe.py (o el nombre del ejecutable principal).
En el Readme del último link dice: https://github.com/SYSTRAN/faster-whisper#usage
Realmente, de todo lo que aparece allí, no se cuales son definiciones de variables de entorno y parámetros a guardar en x archivos, y cual es la línea de comandos a utilizar.
Luego aparece: https://github.com/SYSTRAN/faster-whisper#going-further
Y allí aparece detallado transcribe.py https://github.com/SYSTRAN/faster-whisper/blob/master/faster_whisper/transcr...
Que en sus 1.000 líneas muestra lo que hace. Si no me equivoco, es el mismo nombre de ejecutable Python que utiliza el whisper a secas. Tal vez pudiera probar a reemplazar todos los archivos *.py y librerías en el directorio de whispers por los de faster_whisper y ejecutarlo con el mismo comando whisper, pero debo ajustar los parámetros de la línea de comandos.
Finalmente, he encontrado algo que voy a probar por la tarde de sudamérica:
https://registry.hub.docker.com/r/beecave/insanely-fast-whisper-rocm
https://registry.hub.docker.com/layers/beecave/insanely-fast-whisper-rocm/ma...
https://github.com/Vaibhavs10/insanely-fast-whisper
https://github.com/ochen1/insanely-fast-whisper-cli
https://github.com/Vaibhavs10/insanely-fast-whisper
Insanely Fast Whisper https://www.youtube.com/watch?v=e1pmV8l7uLs
Finalmente, he optado por eliminar anaconda3 y previamente sus seteos .
Para no meterme con docker: https://www.docker.com/
Opté por instalar la versión de: https://github.com/Vaibhavs10/insanely-fast-whisper
Con
pipx install insanely-fast-whisper --force --pip-args="--ignore-requires-python"
Funciona: $insanely-fast-whisper --model-name distil-whisper/large-v2 --file-name archivo.mp3 config.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.29k/2.29k [00:00<00:00, 26.4MB/s] model.safetensors: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.51G/1.51G [00:42<00:00, 35.9MB/s] generation_config.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.62k/3.62k [00:00<00:00, 41.6MB/s] tokenizer_config.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 283k/283k [00:00<00:00, 1.02MB/s] vocab.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 836k/836k [00:00<00:00, 1.98MB/s] tokenizer.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.48M/2.48M [00:00<00:00, 4.29MB/s] merges.txt: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 494k/494k [00:00<00:00, 1.76MB/s] normalizer.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 52.7k/52.7k [00:00<00:00, 271MB/s] added_tokens.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 34.6k/34.6k [00:00<00:00, 135MB/s] special_tokens_map.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.08k/2.08k [00:00<00:00, 25.0MB/s] preprocessor_config.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 339/339 [00:00<00:00, 4.37MB/s] Device set to use cuda:0 Traceback (most recent call last): Varias lineas de error y termina con: RuntimeError: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx
Próximo paso: instalar ZLUDA: https://github.com/vosen/ZLUDA
Lamentablemente la compilación con Rust de ZLUDA falla:
Compiling ptx v0.0.0 (/home/jerbes/bin/ZLUDA/ptx) error[E0599]: no variant or associated item named `NVML_ERROR_NOT_SUPPORTED` found for enum `Result` in the current scope --> zluda_ml/src/impl.rs:11:19 | 11 | nvmlReturn_t::NVML_ERROR_NOT_SUPPORTED | ^^^^^^^^^^^^^^^^^^^^^^^^ variant or associated item not found in `Result<(), nvmlError_t>` | help: there is an associated constant `ERROR_NOT_SUPPORTED` with a similar name | 11 | nvmlReturn_t::ERROR_NOT_SUPPORTED | ~~~~~~~~~~~~~~~~~~~
For more information about this error, try `rustc --explain E0599`. error: could not compile `zluda_ml` (lib) due to 1 previous error warning: build failed, waiting for other jobs to finish...
Por ahora solo puedo seguir utilizando el primer whisper. Tengo que volver a intentar con faster-whisper
Eliminé y reinstalé faster-whisper: pipx install faster-whisper --include-deps installed package faster-whisper 1.1.0, installed using Python 3.11.11 These apps are now globally available - coloredlogs - ct2-fairseq-converter - ct2-marian-converter - ct2-openai-gpt2-converter - ct2-opennmt-py-converter - ct2-opennmt-tf-converter - ct2-opus-mt-converter - ct2-transformers-converter - f2py - huggingface-cli - humanfriendly - isympy - normalizer - numpy-config - onnxruntime_test - pyav - tqdm These manual pages are now globally available - man1/isympy.1 done! ✨ 🌟 ✨y Claramente, el comando faster-whisper no existe! Tengo que ver cual de esas aplicaciones hace lo que necesito, por ejemplo: ct2-opennmt-py-converter Salu2 -- USA LINUX OPENSUSE QUE ES SOFTWARE LIBRE, NO NECESITAS PIRATEAR NADA Y NI TE VAS A PREOCUPAR MAS POR LOS VIRUS Y SPYWARES: http://www.opensuse.org/es/ Puedes visitar mi blog en: http://jerbes.blogspot.com.ar/

El mié, 18 dic 2024 a las 8:38, Juan Erbes (<jerbes@gmail.com>) escribió:
El mié, 18 dic 2024 a las 8:30, Juan Erbes (<jerbes@gmail.com>) escribió:
El mar, 17 dic 2024 a las 19:25, Juan Erbes (<jerbes@gmail.com>) escribió:
El mar, 17 dic 2024 a las 12:10, Juan Erbes (<jerbes@gmail.com>) escribió:
Finalmente, he encontrado algo que voy a probar por la tarde de sudamérica:
https://registry.hub.docker.com/r/beecave/insanely-fast-whisper-rocm
https://registry.hub.docker.com/layers/beecave/insanely-fast-whisper-rocm/ma...
https://github.com/Vaibhavs10/insanely-fast-whisper
https://github.com/ochen1/insanely-fast-whisper-cli
https://github.com/Vaibhavs10/insanely-fast-whisper
Insanely Fast Whisper https://www.youtube.com/watch?v=e1pmV8l7uLs
Finalmente, he optado por eliminar anaconda3 y previamente sus seteos .
Para no meterme con docker: https://www.docker.com/
Opté por instalar la versión de: https://github.com/Vaibhavs10/insanely-fast-whisper
Con
pipx install insanely-fast-whisper --force --pip-args="--ignore-requires-python"
Funciona: $insanely-fast-whisper --model-name distil-whisper/large-v2 --file-name archivo.mp3 config.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.29k/2.29k [00:00<00:00, 26.4MB/s] model.safetensors: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.51G/1.51G [00:42<00:00, 35.9MB/s] generation_config.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.62k/3.62k [00:00<00:00, 41.6MB/s] tokenizer_config.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 283k/283k [00:00<00:00, 1.02MB/s] vocab.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 836k/836k [00:00<00:00, 1.98MB/s] tokenizer.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.48M/2.48M [00:00<00:00, 4.29MB/s] merges.txt: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 494k/494k [00:00<00:00, 1.76MB/s] normalizer.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 52.7k/52.7k [00:00<00:00, 271MB/s] added_tokens.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 34.6k/34.6k [00:00<00:00, 135MB/s] special_tokens_map.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.08k/2.08k [00:00<00:00, 25.0MB/s] preprocessor_config.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 339/339 [00:00<00:00, 4.37MB/s] Device set to use cuda:0 Traceback (most recent call last): Varias lineas de error y termina con: RuntimeError: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx
Próximo paso: instalar ZLUDA: https://github.com/vosen/ZLUDA
Lamentablemente la compilación con Rust de ZLUDA falla:
Compiling ptx v0.0.0 (/home/jerbes/bin/ZLUDA/ptx) error[E0599]: no variant or associated item named `NVML_ERROR_NOT_SUPPORTED` found for enum `Result` in the current scope --> zluda_ml/src/impl.rs:11:19 | 11 | nvmlReturn_t::NVML_ERROR_NOT_SUPPORTED | ^^^^^^^^^^^^^^^^^^^^^^^^ variant or associated item not found in `Result<(), nvmlError_t>` | help: there is an associated constant `ERROR_NOT_SUPPORTED` with a similar name | 11 | nvmlReturn_t::ERROR_NOT_SUPPORTED | ~~~~~~~~~~~~~~~~~~~
For more information about this error, try `rustc --explain E0599`. error: could not compile `zluda_ml` (lib) due to 1 previous error warning: build failed, waiting for other jobs to finish...
Por ahora solo puedo seguir utilizando el primer whisper. Tengo que volver a intentar con faster-whisper
Eliminé y reinstalé faster-whisper:
pipx install faster-whisper --include-deps installed package faster-whisper 1.1.0, installed using Python 3.11.11 These apps are now globally available - coloredlogs - ct2-fairseq-converter - ct2-marian-converter - ct2-openai-gpt2-converter - ct2-opennmt-py-converter - ct2-opennmt-tf-converter - ct2-opus-mt-converter - ct2-transformers-converter - f2py - huggingface-cli - humanfriendly - isympy - normalizer - numpy-config - onnxruntime_test - pyav - tqdm These manual pages are now globally available - man1/isympy.1 done! ✨ 🌟 ✨y
Claramente, el comando faster-whisper no existe!
Tengo que ver cual de esas aplicaciones hace lo que necesito, por ejemplo:
ct2-opennmt-py-converter
No se si será que estoy un poco oxidado, pero no he encontrado los parámetros para ejecutar el comando adecuado. Seguí buscando y encontré una variante de faster-whisper que funciona: https://github.com/Softcatala/whisper-ctranslate2 No hace falta anaconda3 y para que cree en entorno virtual se utiliza pipx como reemplazo de anaconda3: $pipx install whisper-ctranslate2 Para ejecutarlo, "parado" en el directorio donde están los mp3 a traducir se ejecuta: $whisper-ctranslate2 audio1.mp3 --model medium --language Spanish Si no se especifica el idioma, lo detecta automáticamente y la primera vez descarga algunos archivos: Detecting language using up to the first 30 seconds. Use `--language` to specify the language config.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.26k/2.26k [00:00<00:00, 24.7MB/s] vocabulary.txt: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 460k/460k [00:00<00:00, 29.2MB/s] tokenizer.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.20M/2.20M [00:00<00:00, 4.74MB/s] model.bin: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.53G/1.53G [00:42<00:00, 36.3MB/s] Detected language 'Spanish' with probability 0.995651 El autor es Jordi Mas jmas@softcatala.org Por lo visto, es catalan! Funciona bastante bien, con un 25% de utilización global de CPU, contra un 55% del whisper a secas (ninguno con CUDA). Cuando consiga compilar ZLUDA sin errores, tal vez intente de nuevo con insanely-fast-whisper. Salu2 -- USA LINUX OPENSUSE QUE ES SOFTWARE LIBRE, NO NECESITAS PIRATEAR NADA Y NI TE VAS A PREOCUPAR MAS POR LOS VIRUS Y SPYWARES: http://www.opensuse.org/es/ Puedes visitar mi blog en: http://jerbes.blogspot.com.ar/

El mié, 18 dic 2024 a las 11:54, Juan Erbes (<jerbes@gmail.com>) escribió:
El mié, 18 dic 2024 a las 8:38, Juan Erbes (<jerbes@gmail.com>) escribió:
El mié, 18 dic 2024 a las 8:30, Juan Erbes (<jerbes@gmail.com>) escribió:
El mar, 17 dic 2024 a las 19:25, Juan Erbes (<jerbes@gmail.com>) escribió:
El mar, 17 dic 2024 a las 12:10, Juan Erbes (<jerbes@gmail.com>) escribió:
Finalmente, he encontrado algo que voy a probar por la tarde de sudamérica:
https://registry.hub.docker.com/r/beecave/insanely-fast-whisper-rocm
https://registry.hub.docker.com/layers/beecave/insanely-fast-whisper-rocm/ma...
https://github.com/Vaibhavs10/insanely-fast-whisper
https://github.com/ochen1/insanely-fast-whisper-cli
https://github.com/Vaibhavs10/insanely-fast-whisper
Insanely Fast Whisper https://www.youtube.com/watch?v=e1pmV8l7uLs
Finalmente, he optado por eliminar anaconda3 y previamente sus seteos .
Para no meterme con docker: https://www.docker.com/
Opté por instalar la versión de: https://github.com/Vaibhavs10/insanely-fast-whisper
Con
pipx install insanely-fast-whisper --force --pip-args="--ignore-requires-python"
Funciona: $insanely-fast-whisper --model-name distil-whisper/large-v2 --file-name archivo.mp3 config.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.29k/2.29k [00:00<00:00, 26.4MB/s] model.safetensors: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.51G/1.51G [00:42<00:00, 35.9MB/s] generation_config.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.62k/3.62k [00:00<00:00, 41.6MB/s] tokenizer_config.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 283k/283k [00:00<00:00, 1.02MB/s] vocab.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 836k/836k [00:00<00:00, 1.98MB/s] tokenizer.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.48M/2.48M [00:00<00:00, 4.29MB/s] merges.txt: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 494k/494k [00:00<00:00, 1.76MB/s] normalizer.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 52.7k/52.7k [00:00<00:00, 271MB/s] added_tokens.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 34.6k/34.6k [00:00<00:00, 135MB/s] special_tokens_map.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.08k/2.08k [00:00<00:00, 25.0MB/s] preprocessor_config.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 339/339 [00:00<00:00, 4.37MB/s] Device set to use cuda:0 Traceback (most recent call last): Varias lineas de error y termina con: RuntimeError: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx
Próximo paso: instalar ZLUDA: https://github.com/vosen/ZLUDA
Lamentablemente la compilación con Rust de ZLUDA falla:
Compiling ptx v0.0.0 (/home/jerbes/bin/ZLUDA/ptx) error[E0599]: no variant or associated item named `NVML_ERROR_NOT_SUPPORTED` found for enum `Result` in the current scope --> zluda_ml/src/impl.rs:11:19 | 11 | nvmlReturn_t::NVML_ERROR_NOT_SUPPORTED | ^^^^^^^^^^^^^^^^^^^^^^^^ variant or associated item not found in `Result<(), nvmlError_t>` | help: there is an associated constant `ERROR_NOT_SUPPORTED` with a similar name | 11 | nvmlReturn_t::ERROR_NOT_SUPPORTED | ~~~~~~~~~~~~~~~~~~~
For more information about this error, try `rustc --explain E0599`. error: could not compile `zluda_ml` (lib) due to 1 previous error warning: build failed, waiting for other jobs to finish...
Por ahora solo puedo seguir utilizando el primer whisper. Tengo que volver a intentar con faster-whisper
Eliminé y reinstalé faster-whisper:
pipx install faster-whisper --include-deps installed package faster-whisper 1.1.0, installed using Python 3.11.11 These apps are now globally available - coloredlogs - ct2-fairseq-converter - ct2-marian-converter - ct2-openai-gpt2-converter - ct2-opennmt-py-converter - ct2-opennmt-tf-converter - ct2-opus-mt-converter - ct2-transformers-converter - f2py - huggingface-cli - humanfriendly - isympy - normalizer - numpy-config - onnxruntime_test - pyav - tqdm These manual pages are now globally available - man1/isympy.1 done! ✨ 🌟 ✨y
Claramente, el comando faster-whisper no existe!
Tengo que ver cual de esas aplicaciones hace lo que necesito, por ejemplo:
ct2-opennmt-py-converter
No se si será que estoy un poco oxidado, pero no he encontrado los parámetros para ejecutar el comando adecuado.
Seguí buscando y encontré una variante de faster-whisper que funciona:
https://github.com/Softcatala/whisper-ctranslate2
No hace falta anaconda3 y para que cree en entorno virtual se utiliza pipx como reemplazo de anaconda3:
$pipx install whisper-ctranslate2
Para ejecutarlo, "parado" en el directorio donde están los mp3 a traducir se ejecuta:
$whisper-ctranslate2 audio1.mp3 --model medium --language Spanish
Si no se especifica el idioma, lo detecta automáticamente y la primera vez descarga algunos archivos:
Detecting language using up to the first 30 seconds. Use `--language` to specify the language config.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.26k/2.26k [00:00<00:00, 24.7MB/s] vocabulary.txt: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 460k/460k [00:00<00:00, 29.2MB/s] tokenizer.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.20M/2.20M [00:00<00:00, 4.74MB/s] model.bin: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.53G/1.53G [00:42<00:00, 36.3MB/s] Detected language 'Spanish' with probability 0.995651
El autor es Jordi Mas jmas@softcatala.org Por lo visto, es catalan!
Funciona bastante bien, con un 25% de utilización global de CPU, contra un 55% del whisper a secas (ninguno con CUDA).
Cuando consiga compilar ZLUDA sin errores, tal vez intente de nuevo con insanely-fast-whisper.
Me olvidé de dar los datos de rendimiento del whisper-ctranslate2, que viene a ser más o menos lo mismo que faster-whisper, porque ambos están basados en ctranslate2, solamente que a ese no le encontré la vuelta de como utilizarlo. El whisper original tardaba aproximadamente 1.1 veces la duración del audio con un 55% de utilización global de CPU, mientras que el whisper-ctranslate2 tarda 1/3 de la duración del audio, con un 25% de utilización global de CPU. La medición para un audio de 18:33 minutos tardó en convertirse a texto 6:12 minutos. Salu2 -- USA LINUX OPENSUSE QUE ES SOFTWARE LIBRE, NO NECESITAS PIRATEAR NADA Y NI TE VAS A PREOCUPAR MAS POR LOS VIRUS Y SPYWARES: http://www.opensuse.org/es/ Puedes visitar mi blog en: http://jerbes.blogspot.com.ar/

El mié, 18 dic 2024 a las 22:14, Juan Erbes (<jerbes@gmail.com>) escribió:
El mié, 18 dic 2024 a las 11:54, Juan Erbes (<jerbes@gmail.com>) escribió:
El mié, 18 dic 2024 a las 8:38, Juan Erbes (<jerbes@gmail.com>) escribió:
El mié, 18 dic 2024 a las 8:30, Juan Erbes (<jerbes@gmail.com>) escribió:
El mar, 17 dic 2024 a las 19:25, Juan Erbes (<jerbes@gmail.com>) escribió:
El mar, 17 dic 2024 a las 12:10, Juan Erbes (<jerbes@gmail.com>) escribió:
Finalmente, he encontrado algo que voy a probar por la tarde de sudamérica:
https://registry.hub.docker.com/r/beecave/insanely-fast-whisper-rocm
https://registry.hub.docker.com/layers/beecave/insanely-fast-whisper-rocm/ma...
https://github.com/Vaibhavs10/insanely-fast-whisper
https://github.com/ochen1/insanely-fast-whisper-cli
https://github.com/Vaibhavs10/insanely-fast-whisper
Insanely Fast Whisper https://www.youtube.com/watch?v=e1pmV8l7uLs
Finalmente, he optado por eliminar anaconda3 y previamente sus seteos .
Para no meterme con docker: https://www.docker.com/
Opté por instalar la versión de: https://github.com/Vaibhavs10/insanely-fast-whisper
Con
pipx install insanely-fast-whisper --force --pip-args="--ignore-requires-python"
Funciona: $insanely-fast-whisper --model-name distil-whisper/large-v2 --file-name archivo.mp3 config.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.29k/2.29k [00:00<00:00, 26.4MB/s] model.safetensors: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.51G/1.51G [00:42<00:00, 35.9MB/s] generation_config.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.62k/3.62k [00:00<00:00, 41.6MB/s] tokenizer_config.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 283k/283k [00:00<00:00, 1.02MB/s] vocab.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 836k/836k [00:00<00:00, 1.98MB/s] tokenizer.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.48M/2.48M [00:00<00:00, 4.29MB/s] merges.txt: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 494k/494k [00:00<00:00, 1.76MB/s] normalizer.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 52.7k/52.7k [00:00<00:00, 271MB/s] added_tokens.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 34.6k/34.6k [00:00<00:00, 135MB/s] special_tokens_map.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.08k/2.08k [00:00<00:00, 25.0MB/s] preprocessor_config.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 339/339 [00:00<00:00, 4.37MB/s] Device set to use cuda:0 Traceback (most recent call last): Varias lineas de error y termina con: RuntimeError: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx
Próximo paso: instalar ZLUDA: https://github.com/vosen/ZLUDA
Lamentablemente la compilación con Rust de ZLUDA falla:
Compiling ptx v0.0.0 (/home/jerbes/bin/ZLUDA/ptx) error[E0599]: no variant or associated item named `NVML_ERROR_NOT_SUPPORTED` found for enum `Result` in the current scope --> zluda_ml/src/impl.rs:11:19 | 11 | nvmlReturn_t::NVML_ERROR_NOT_SUPPORTED | ^^^^^^^^^^^^^^^^^^^^^^^^ variant or associated item not found in `Result<(), nvmlError_t>` | help: there is an associated constant `ERROR_NOT_SUPPORTED` with a similar name | 11 | nvmlReturn_t::ERROR_NOT_SUPPORTED | ~~~~~~~~~~~~~~~~~~~
For more information about this error, try `rustc --explain E0599`. error: could not compile `zluda_ml` (lib) due to 1 previous error warning: build failed, waiting for other jobs to finish...
Por ahora solo puedo seguir utilizando el primer whisper. Tengo que volver a intentar con faster-whisper
Eliminé y reinstalé faster-whisper:
pipx install faster-whisper --include-deps installed package faster-whisper 1.1.0, installed using Python 3.11.11 These apps are now globally available - coloredlogs - ct2-fairseq-converter - ct2-marian-converter - ct2-openai-gpt2-converter - ct2-opennmt-py-converter - ct2-opennmt-tf-converter - ct2-opus-mt-converter - ct2-transformers-converter - f2py - huggingface-cli - humanfriendly - isympy - normalizer - numpy-config - onnxruntime_test - pyav - tqdm These manual pages are now globally available - man1/isympy.1 done! ✨ 🌟 ✨y
Claramente, el comando faster-whisper no existe!
Tengo que ver cual de esas aplicaciones hace lo que necesito, por ejemplo:
ct2-opennmt-py-converter
No se si será que estoy un poco oxidado, pero no he encontrado los parámetros para ejecutar el comando adecuado.
Seguí buscando y encontré una variante de faster-whisper que funciona:
https://github.com/Softcatala/whisper-ctranslate2
No hace falta anaconda3 y para que cree en entorno virtual se utiliza pipx como reemplazo de anaconda3:
$pipx install whisper-ctranslate2
Para ejecutarlo, "parado" en el directorio donde están los mp3 a traducir se ejecuta:
$whisper-ctranslate2 audio1.mp3 --model medium --language Spanish
Si no se especifica el idioma, lo detecta automáticamente y la primera vez descarga algunos archivos:
Detecting language using up to the first 30 seconds. Use `--language` to specify the language config.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.26k/2.26k [00:00<00:00, 24.7MB/s] vocabulary.txt: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 460k/460k [00:00<00:00, 29.2MB/s] tokenizer.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.20M/2.20M [00:00<00:00, 4.74MB/s] model.bin: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.53G/1.53G [00:42<00:00, 36.3MB/s] Detected language 'Spanish' with probability 0.995651
El autor es Jordi Mas jmas@softcatala.org Por lo visto, es catalan!
Funciona bastante bien, con un 25% de utilización global de CPU, contra un 55% del whisper a secas (ninguno con CUDA).
Cuando consiga compilar ZLUDA sin errores, tal vez intente de nuevo con insanely-fast-whisper.
Me olvidé de dar los datos de rendimiento del whisper-ctranslate2, que viene a ser más o menos lo mismo que faster-whisper, porque ambos están basados en ctranslate2, solamente que a ese no le encontré la vuelta de como utilizarlo. El whisper original tardaba aproximadamente 1.1 veces la duración del audio con un 55% de utilización global de CPU, mientras que el whisper-ctranslate2 tarda 1/3 de la duración del audio, con un 25% de utilización global de CPU. La medición para un audio de 18:33 minutos tardó en convertirse a texto 6:12 minutos.
Muchas gracias por la información! Excelente aporte! Saludos!

On Mon, Dec 16, 2024, 06:49 Juan Erbes <jerbes@gmail.com> wrote:
Después de renegar con herramientas de pago online, finalmente encontré una herramienta de código abierto y openai: https://github.com/openai/whisper
Una de sus implementaciones se llama anaconda: https://repo.anaconda.com/archive/
Esta es la guia de instalación:
https://www.linuxlinks.com/machine-learning-linux-whisper-automatic-speech-r...
Yo opté por instalarlo en el home de usuario logueado con su en konsole: sh Anaconda3-2024.10-1-Linux-x86_64.sh
Luego:
$ conda create --name whisper $ conda activate whisper $ pipx install openai-whisper
Con todo ello, debería quedar activado y "parado" en el directorio donde están los mp3 de audio a transcribir se ejecuta: $ whisper audio.mp3 --model medium --language Spanish
Así por cada mp3. He probado el modelo large, pero tarda demasiado. Con el modelo medium, al 50% de uso de CPU global con Ryzen 5700X tarda aprox. 1,1 minutos por cada minuto de audio.
La citada herramienta genera archivos .txt .srt .vtt y .tsv
He encontrado la herramienta faster_whisper:
https://software.opensuse.org//download.html?project=science%3Amachinelearni...
python311-faster_whisper - Reimplementation of OpenAI's Whisper model using CTranslate2
faster-whisper is a reimplementation of OpenAI's Whisper model using CTranslate2, which is a fast inference engine for Transformer models. This implementation is up to 4 times faster than openai/whisper for the same accuracy while using less memory. The efficiency can be further improved with 8-bit quantization on both CPU and GPU.
Elegí python311, porque es la misma versión que activó conda. Me queda por cambiar las variables de entorno para utilizar faster_whisper: //usr/lib/python3.11/site-packages/faster_whisper/transcribe.py
la ruta del viejo instalado por pipx es:
/home/usuario/.local/share/pipx/venvs/openai-whisper/lib64/python3.11/site-packages/whisper/transcribe.py
Si alguien lo ha probado o quiere hacerlo, ¡bienvenido sea el aporte!
Salu2
-- USA LINUX OPENSUSE QUE ES SOFTWARE LIBRE, NO NECESITAS PIRATEAR NADA Y NI TE VAS A PREOCUPAR MAS POR LOS VIRUS Y SPYWARES: http://www.opensuse.org/es/ Puedes visitar mi blog en: http://jerbes.blogspot.com.ar/
Hola!, Que tal la calidad del resultado?, va sincronizado correctamente?, qué porcentaje de acierto tiene la conversión de audio a texto?. Atte. Cyrus.-

El dom, 5 ene 2025 a las 18:44, Cyrus (<cyruspy@gmail.com>) escribió:
On Mon, Dec 16, 2024, 06:49 Juan Erbes <jerbes@gmail.com> wrote:
Después de renegar con herramientas de pago online, finalmente encontré una herramienta de código abierto y openai: https://github.com/openai/whisper
Una de sus implementaciones se llama anaconda: https://repo.anaconda.com/archive/
Esta es la guia de instalación: https://www.linuxlinks.com/machine-learning-linux-whisper-automatic-speech-r...
Yo opté por instalarlo en el home de usuario logueado con su en konsole: sh Anaconda3-2024.10-1-Linux-x86_64.sh
Luego:
$ conda create --name whisper $ conda activate whisper $ pipx install openai-whisper
Con todo ello, debería quedar activado y "parado" en el directorio donde están los mp3 de audio a transcribir se ejecuta: $ whisper audio.mp3 --model medium --language Spanish
Así por cada mp3. He probado el modelo large, pero tarda demasiado. Con el modelo medium, al 50% de uso de CPU global con Ryzen 5700X tarda aprox. 1,1 minutos por cada minuto de audio.
La citada herramienta genera archivos .txt .srt .vtt y .tsv
He encontrado la herramienta faster_whisper: https://software.opensuse.org//download.html?project=science%3Amachinelearni...
python311-faster_whisper - Reimplementation of OpenAI's Whisper model using CTranslate2
faster-whisper is a reimplementation of OpenAI's Whisper model using CTranslate2, which is a fast inference engine for Transformer models. This implementation is up to 4 times faster than openai/whisper for the same accuracy while using less memory. The efficiency can be further improved with 8-bit quantization on both CPU and GPU.
Elegí python311, porque es la misma versión que activó conda. Me queda por cambiar las variables de entorno para utilizar faster_whisper: //usr/lib/python3.11/site-packages/faster_whisper/transcribe.py
la ruta del viejo instalado por pipx es: /home/usuario/.local/share/pipx/venvs/openai-whisper/lib64/python3.11/site-packages/whisper/transcribe.py
Si alguien lo ha probado o quiere hacerlo, ¡bienvenido sea el aporte!
Hola!,
Que tal la calidad del resultado?, va sincronizado correctamente?, qué porcentaje de acierto tiene la conversión de audio a texto?.
La calidad del resultado depende de la calidad del audio, frecuencia de muestreo y el modelo elegido. Sincroniza correctamente y genera archivos .srt .tsv .txt .vtt y .json Con el modelo medium y audio de buena calidad con una frecuencia de muestreo de 22.050 Hz o 44.100 Hz genera buenos resultados. Lamentablemente algunos audios fueron grabados como voz a una frecuencia de muestreo de 8 KHz, con lo cual cae mucho la precisión, aunque se puede mejorar un poco exportando el audio a mp3 con una frecuencia de muestreo de 22.050. Todos los archivos de audio son tratados con Audacity, aplicando reducción de ruido y nivelando el nivel global del mismo. En algunos casos, también se realiza ecualizado. Como has recortado el email, vuelvo a pegar lo que estoy utilizando: https://github.com/Softcatala/whisper-ctranslate2 No hace falta anaconda3 y para que cree en entorno virtual se utiliza pipx como reemplazo de anaconda3: $pipx install whisper-ctranslate2 Para ejecutarlo, "parado" en el directorio donde están los mp3 a traducir se ejecuta: $whisper-ctranslate2 audio1.mp3 --model medium --language Spanish Si no se especifica el idioma, lo detecta automáticamente y la primera vez descarga algunos archivos. Salu2 -- USA LINUX OPENSUSE QUE ES SOFTWARE LIBRE, NO NECESITAS PIRATEAR NADA Y NI TE VAS A PREOCUPAR MAS POR LOS VIRUS Y SPYWARES: http://www.opensuse.org/es/ Puedes visitar mi blog en: http://jerbes.blogspot.com.ar/
participants (4)
-
Carlos E. R.
-
Cyrus
-
Juan Erbes
-
Patagonic Penguin