Whisper

Whisper Whisper

Whisperlink image 0

IntroducciĂłnlink image 1

Whisper es un sistema de reconocimiento automático de voz (automatic speech recognition (ASR)) entrenado en 680.000 horas de datos supervisados ​​multilingües y multitarea recopilados de la web. El uso de un conjunto de datos tan grande y diverso conduce a una mayor solidez ante los acentos, el ruido de fondo y el lenguaje técnico. Además, permite la transcripción en varios idiomas, así como la traducción de esos idiomas al inglés

Wesite

Paper

GitHub

Model card

InstalaciĂłnlink image 2

Para poder instalar esta herramienta lo mejor es crearse un nuevo entorno de anaconda

	
!conda create -n whisper
Copy

Entramos al entorno

	
!conda create -n whisper
!conda activate whisper
Copy

Instalamos todos los paquetes necesarios

	
!conda create -n whisper
!conda activate whisper
!conda install pytorch torchvision torchaudio pytorch-cuda=11.6 -c pytorch -c nvidia
Copy

Por Ăşltimo instalamos whisper

	
!conda create -n whisper
!conda activate whisper
!conda install pytorch torchvision torchaudio pytorch-cuda=11.6 -c pytorch -c nvidia
!pip install git+https://github.com/openai/whisper.git
Copy

Y actualizamos ffmpeg

	
!conda create -n whisper
!conda activate whisper
!conda install pytorch torchvision torchaudio pytorch-cuda=11.6 -c pytorch -c nvidia
!pip install git+https://github.com/openai/whisper.git
!sudo apt update && sudo apt install ffmpeg
Copy

Usolink image 3

Importamos whisper

	
!conda create -n whisper
!conda activate whisper
!conda install pytorch torchvision torchaudio pytorch-cuda=11.6 -c pytorch -c nvidia
!pip install git+https://github.com/openai/whisper.git
!sudo apt update && sudo apt install ffmpeg
import whisper
Copy

Seleccionamos el modelo, cuanto más grande mejor lo hará

	
!conda create -n whisper
!conda activate whisper
!conda install pytorch torchvision torchaudio pytorch-cuda=11.6 -c pytorch -c nvidia
!pip install git+https://github.com/openai/whisper.git
!sudo apt update && sudo apt install ffmpeg
import whisper
# model = "tiny"
# model = "base"
# model = "small"
# model = "medium"
model = "large"
model = whisper.load_model(model)
Copy

Cargamos el audio de este anuncio antiguo (de 1987) de Micro Machines

	
!conda create -n whisper
!conda activate whisper
!conda install pytorch torchvision torchaudio pytorch-cuda=11.6 -c pytorch -c nvidia
!pip install git+https://github.com/openai/whisper.git
!sudo apt update && sudo apt install ffmpeg
import whisper
# model = "tiny"
# model = "base"
# model = "small"
# model = "medium"
model = "large"
model = whisper.load_model(model)
audio_path = "MicroMachines.mp3"
audio = whisper.load_audio(audio_path)
audio = whisper.pad_or_trim(audio)
Copy
	
!conda create -n whisper
!conda activate whisper
!conda install pytorch torchvision torchaudio pytorch-cuda=11.6 -c pytorch -c nvidia
!pip install git+https://github.com/openai/whisper.git
!sudo apt update && sudo apt install ffmpeg
import whisper
# model = "tiny"
# model = "base"
# model = "small"
# model = "medium"
model = "large"
model = whisper.load_model(model)
audio_path = "MicroMachines.mp3"
audio = whisper.load_audio(audio_path)
audio = whisper.pad_or_trim(audio)
mel = whisper.log_mel_spectrogram(audio).to(model.device)
Copy
	
!conda create -n whisper
!conda activate whisper
!conda install pytorch torchvision torchaudio pytorch-cuda=11.6 -c pytorch -c nvidia
!pip install git+https://github.com/openai/whisper.git
!sudo apt update && sudo apt install ffmpeg
import whisper
# model = "tiny"
# model = "base"
# model = "small"
# model = "medium"
model = "large"
model = whisper.load_model(model)
audio_path = "MicroMachines.mp3"
audio = whisper.load_audio(audio_path)
audio = whisper.pad_or_trim(audio)
mel = whisper.log_mel_spectrogram(audio).to(model.device)
_, probs = model.detect_language(mel)
print(f"Detected language: {max(probs, key=probs.get)}")
Copy
	
Detected language: en
	
options = whisper.DecodingOptions()
result = whisper.decode(model, mel, options)
Copy
	
options = whisper.DecodingOptions()
result = whisper.decode(model, mel, options)
result.text
Copy
	
"This is the Micro Machine Man presenting the most midget miniature motorcade of micro machines. Each one has dramatic details, terrific trim, precision paint jobs, plus incredible micro machine pocket play sets. There's a police station, fire station, restaurant, service station, and more. Perfect pocket portables to take any place. And there are many miniature play sets to play with and each one comes with its own special edition micro machine vehicle and fun fantastic features that miraculously move. Raise the boat lift at the airport, marina, man the gun turret at the army base, clean your car at the car wash, raise the toll bridge. And these play sets fit together to form a micro machine world. Micro machine pocket play sets so tremendously tiny, so perfectly precise, so dazzlingly detailed, you'll want to pocket them all. Micro machines and micro machine pocket play sets sold separately from Galoob. The smaller they are, the better they are."

Seguir leyendo

Ăšltimos posts -->

ÂżHas visto estos proyectos?

Horeca chatbot

Horeca chatbot Horeca chatbot
Python
LangChain
PostgreSQL
PGVector
React
Kubernetes
Docker
GitHub Actions

Chatbot conversacional para cocineros de hoteles y restaurantes. Un cocinero, jefe de cocina o camaeror de un hotel o restaurante puede hablar con el chatbot para obtener información de recetas y menús. Pero además implementa agentes, con los cuales puede editar o crear nuevas recetas o menús

Naviground

Naviground Naviground

Sistema de percepciĂłn para vehĂ­culos autĂłnomos

Subtify

Subtify Subtify
Python
Whisper
Spaces

Generador de subtítulos para videos en el idioma que desees. Además a cada persona le pone su subtítulo de un color

Ver todos los proyectos -->

ÂżQuieres aplicar la IA en tu proyecto? Contactame!

ÂżQuieres mejorar con estos tips?

Ăšltimos tips -->

Usa esto en local

Los espacios de Hugging Face nos permite ejecutar modelos con demos muy sencillas, pero ¿qué pasa si la demo se rompe? O si el usuario la elimina? Por ello he creado contenedores docker con algunos espacios interesantes, para poder usarlos de manera local, pase lo que pase. De hecho, es posible que si pinchas en alún botón de ver proyecto te lleve a un espacio que no funciona.

Flow edit

Flow edit Flow edit

Edita imágenes con este modelo de Flow. Basándose en SD3 o FLUX puedes editar cualquier imagen y generar nuevas

FLUX.1-RealismLora

FLUX.1-RealismLora FLUX.1-RealismLora
Ver todos los contenedores -->

ÂżQuieres aplicar la IA en tu proyecto? Contactame!

ÂżQuieres entrenar tu modelo con estos datasets?

short-jokes-dataset

Dataset de chistes en inglés

opus100

Dataset con traducciones de inglés a español

netflix_titles

Dataset con pelĂ­culas y series de Netflix

Ver más datasets -->