Whisper

Whisper Whisper

Sussurrolink image 8

Introduçãolink image 9

Este caderno foi traduzido automaticamente para tornĂĄ-lo acessĂ­vel a mais pessoas, por favor me avise se vocĂȘ vir algum erro de digitação..

O Whisper Ă© um sistema de reconhecimento automĂĄtico da fala (ASR) treinado em 680.000 horas de dados supervisionados multilĂ­ngues e multitarefa coletados da web. O uso de um conjunto de dados tĂŁo grande e diversificado leva a uma maior robustez dos sotaques, do ruĂ­do de fundo e da linguagem tĂ©cnica. AlĂ©m disso, permite a transcrição em vĂĄrios idiomas, assim como a tradução desses idiomas para o inglĂȘs.

Wesite

Papel

GitHub

CartĂŁo modelo

Instalaçãolink image 10

A fim de instalar esta ferramenta Ă© melhor criar um novo ambiente anaconda.

	
!conda create -n whisper
Copy

Entramos no meio ambiente

	
!conda create -n whisper
!conda activate whisper
Copy

Instalamos todos os pacotes necessĂĄrios

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

Finalmente, instalamos o 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

E nĂłs atualizamos 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 11

Importamos "sussurros".

	
!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

Selecionamos o modelo, quanto maior, melhor ele farĂĄ.

	
!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

Fizemos o upload do ĂĄudio deste antigo (1987) anĂșncio da 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."

Continuar lendo

Últimos posts -->

VocĂȘ viu esses projetos?

Subtify

Subtify Subtify

Gerador de legendas para vĂ­deos no idioma que vocĂȘ desejar. AlĂ©m disso, coloca uma legenda de cor diferente para cada pessoa

Ver todos os projetos -->

Quer aplicar IA no seu projeto? Entre em contato!

Quer melhorar com essas dicas?

Últimos tips -->

Use isso localmente

Os espaços do Hugging Face nos permitem executar modelos com demos muito simples, mas e se a demo quebrar? Ou se o usuĂĄrio a deletar? Por isso, criei contĂȘineres docker com alguns espaços interessantes, para poder usĂĄ-los localmente, aconteça o que acontecer. Na verdade, se vocĂȘ clicar em qualquer botĂŁo de visualização de projeto, ele pode levĂĄ-lo a um espaço que nĂŁo funciona.

Flow edit

Flow edit Flow edit

Edite imagens com este modelo de Flow. Baseado em SD3 ou FLUX, vocĂȘ pode editar qualquer imagem e gerar novas

Ver todos os contĂȘineres -->

Quer aplicar IA no seu projeto? Entre em contato!

VocĂȘ quer treinar seu modelo com esses datasets?

short-jokes-dataset

Dataset com piadas em inglĂȘs

opus100

Dataset com traduçÔes de inglĂȘs para espanhol

netflix_titles

Dataset com filmes e séries da Netflix

Ver mais datasets -->