
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/