Transcrevendo áudio em texto com Whisper AI

Você tem, por exemplo, reuniões gravadas em vídeo que precisem ter suas atas lavradas?

Ou qualquer outro material em vídeo (com áudio, claro) que você queira transformar em texto?

Uma boa saída é usar o Google Docs e sua ferramenta “digitação por voz”. Com ela você pode deixar o vídeo rolando enquanto o docs transforma o áudio em texto. Você talvez preciso de Virtual Cable (aqui) para ligar virtualmente a saída de áudio do pc ao microfone dele e ainda precisa esperar toda a duração do vídeo/áudio pois tudo ocorre em tempo real.

Outra maneira é utilizando a WhisperAI, que faz parte do OpenAI. Ela é mais rápida e pode deixar rodando em segundo plano enquanto faz outras coisas.

Utilizei para testei um vídeo de uma reunião em português, mas esqueci de tirar screenshots e documentar. O vídeo tinha 29 minutos e levou cerca de 7 minutos para ser transcrito.

Testei também o vídeo do youtube The ‘5-STEP SETUP’ every guitarist should know (aqui) que baixei usando aqueles conversores online… O vídeo de aproximadamente 18 minutos precisou de apenas 2 minutos para ser transcrito gerando o seguinte:

100%|█████████████████████████████████████| 1.42G/1.42G [00:27<00:00, 56.0MiB/s] Detecting language using up to the first 30 seconds. Use --language to specify the language Detected language: English [00:00.000 –> 00:05.720] this guitar sounds great and it plays good but I want it to play great and
[00:05.720 –> 00:10.560] there’s two more guitars with some issues that I can easily fix I want my
[00:10.560 –> 00:14.080] guitars in their best shape and I guess you feel the same about your guitar so
[00:14.080 –> 00:18.480] here’s my five-step foolproof method of setting up guitars at home so they play
[00:18.480 –> 00:23.400] and sound like a dream but beware what we’re about to do is extremely dangerous
[00:23.400 –> 00:29.280] and can seriously damage it it’s not dangerous at all everyone can do this
[00:29.280 –> 00:34.360] with very little tools even and the best of it all it’s free for this video I’m
[00:34.360 –> 00:38.160] assuming your guitar has no major structural flaws like tormented necks
[00:38.160 –> 00:42.560] cracks or other weird issues and if so it may still very well be safe but as
[00:42.560 –> 00:48.360] you just bring it to a luthier instead you’re okay other than that let’s get
[00:48.360 –> 00:54.080] started and we’re gonna have a look at this Novo Saris
[01:10.120 –> 01:14.000] the first thing I noticed was that the action was a little bit too high for my
[01:14.000 –> 01:19.000] own preference I like it low so the action is the distance measured from
[01:19.000 –> 01:24.480] the bottom of the string to the top of the fret and for this generally goes the
[01:24.480 –> 01:29.820] lower the easier is to play but when you get too low the worse it’ll sound notes
[01:29.820 –> 01:34.640] will sustain less long notes can fall dead and we can introduce fret buzz we
[01:34.640 –> 01:38.840] don’t want any of that so it’s a delicate play between playability and a
[01:38.840 –> 01:43.360] good sound if you want to go the easy route we can just see if lowering the
[01:43.360 –> 01:47.860] saddles will fix everything and we’re back to shredding in no time so we’re
[01:47.860 –> 01:53.880] measuring the gap at fret 12 or a method that’s generally a little bit better we
[01:53.880 –> 02:00.120] put a capo on fret 1 and we measure the gap at fret 17 this way we eliminate the
[02:00.120 –> 02:05.960] nut height of the guitar so we get a more accurate read generally both
[02:05.960 –> 02:10.120] measurements will give you the same results so the following is very
[02:10.120 –> 02:14.160] personal what I like my action on the sixth string the thickest to be around
[02:14.160 –> 02:19.320] one and a half millimeters and for the high string goes around one millimeter
[02:19.320 –> 02:23.160] on the left we see the measurements in millimeters the metric system on the
[02:23.160 –> 02:27.280] right the imperial system in inches but I gotta admit I never measure the action
[02:27.280 –> 02:30.480] at all you should always try for getting a good playing guitar and not try hitting
[02:30.480 –> 02:34.660] a number but if you’re new to measuring or setting up the action it may be a
[02:34.660 –> 02:38.240] very good indication of getting in the right ballpark so usually you will see
[02:38.240 –> 02:42.360] higher values recommended so don’t take this as an advice but getting a guitar
[02:42.360 –> 02:46.160] that plays like butter often makes it sound like butter too but feel free to
[02:46.160 –> 02:49.840] go a little bit higher if that feels right for you anyway I’m lowering the
[02:49.840 –> 02:55.240] saddles of the bridge with this Allen wrench don’t overdo it try half a turn
[02:55.240 –> 02:59.600] at first on this guitar we can adjust every single string so I’m gonna do that
[02:59.600 –> 03:03.760] right now and I’ve got some more experience with this I’m just doing a
[03:03.760 –> 03:09.040] whole turn from the get-go and see how that sounds always remember how much you
[03:09.040 –> 03:13.400] turn so you can go back to the original position you started from if everything
[03:13.400 –> 03:17.960] goes south that goes for every adjustment we make in this video always
[03:17.960 –> 03:22.640] write it down how much you change so you can always go back so a whole turn on
[03:22.640 –> 03:27.680] every screw depending on the kind of bridge it can look different on the
[03:27.680 –> 03:31.840] Gibson tunamatic bridge you only get two adjusting points I now lowered the
[03:31.840 –> 03:35.880] action to retune the guitar
[03:41.920 –> 03:48.000] Wow I think the action is a little bit too low for my own preference actually
[03:48.000 –> 03:51.800] but still no dead spots
[03:54.160 –> 03:58.000] that’s how I check just play the chromatic scale every and I suggest
[03:58.000 –> 04:02.840] always checking for buzz with an amp a little bit of buzz without an amp isn’t
[04:02.840 –> 04:11.600] that bad if it’s not amplified you won’t hear it playing on an amp see so now I’m
[04:11.600 –> 04:16.520] measuring just below one and a half millimeters on the sixth string the
[04:16.520 –> 04:24.200] thick the low E string and around one millimeter on the high E I’m happy with
[04:24.200 –> 04:28.600] this I may do some refinement off-camera but I’m very close to how I
[04:28.600 –> 04:32.360] like it for acoustic guitars it’s a little different for this adkin acoustic
[04:32.360 –> 04:36.280] I’m measuring an action of just above three millimeters and you guessed it
[04:36.280 –> 04:40.720] that’s too high for me so I’m carefully taking out the saddle of the bridge and
[04:40.720 –> 04:46.720] going to sand it down twice the amount I want the action to be lowered so I’m
[04:46.720 –> 04:52.400] taking off around the 1.5 millimeters of the saddle you can use a file or sand
[04:52.400 –> 05:00.720] paper or both and make sure to check in between I’m happy I’m finishing it off
[05:00.720 –> 05:09.120] with the finest sandpaper I’ve got place it back let’s see that’s two and a half
[05:09.120 –> 05:12.320] millimeters perfect
[05:16.560 –> 05:21.240] but this isn’t always how it goes so sometimes you find that the slots in the
[05:21.280 –> 05:26.120] nut aren’t filed down deep enough especially on the lower end guitars this
[05:26.120 –> 05:30.740] happens a lot this makes playing in the lower register very hard because the
[05:30.740 –> 05:36.120] strings are so far apart from the frets the only solution for this is get a set
[05:36.120 –> 05:44.400] of slot files and fell them down till it feels great but be careful because you
[05:44.400 –> 05:48.360] can’t go back easily you can with some glue and some residue but it’s very hard
[05:48.360 –> 05:52.080] and also you gotta have the right movement and the right angle so it’s a
[05:52.080 –> 05:57.280] tricky thing you might want to see a luthier for this anyway but sometimes
[05:57.280 –> 06:01.080] when you think everything is right you still can’t get the action low enough
[06:01.080 –> 06:06.120] without introducing dead notes or fret buss and this is a time we take a look
[06:06.120 –> 06:10.620] at the neck and now we’re off to guitar number two because that guitar has that
[06:10.620 –> 06:16.840] issue let’s get the Gibson SG so when I took this Gibson home I changed the
[06:16.840 –> 06:24.080] strings and after doing so a few notes fell dead on the lower part of the neck
[06:24.080 –> 06:34.920] you see over here is good over here
[06:37.560 –> 06:43.120] okay some might be very scared of seeing guitar like this and actually it hurts
[06:43.160 –> 06:48.920] my heart a little bit too the neck was almost perfectly straight that’s the way
[06:48.920 –> 06:54.800] the guitar tech from that shop had it set up and I guess the new strings had a
[06:54.800 –> 06:59.320] different kind of tension on the neck and that causes this issue so let’s get
[06:59.320 –> 07:03.240] to it if you’re as fond as guitar bending as I am you know that the string
[07:03.240 –> 07:06.280] pull of just one string can be pretty high already but just imagine putting
[07:06.280 –> 07:11.800] all those strings on the neck all trying to bend the neck forward and you can
[07:11.840 –> 07:16.520] imagine putting heavier strings or thinner strings on heavily impacts that
[07:16.520 –> 07:22.440] tension on the neck so now let’s introduce the truss rod it’s a rod
[07:22.440 –> 07:26.840] running in the neck that we can adjust so we can get the neck in the perfect
[07:26.840 –> 07:33.720] position so what is perfect well the neck can basically be in three states it
[07:33.720 –> 07:37.400] can be perfectly straight which is tricky to get right but isn’t necessarily
[07:37.720 –> 07:46.880] bad it is how this guitar was set up a back bow which is always bad and an up
[07:46.880 –> 07:51.400] bow and this is what we want a real minimal up bow so the string can ring
[07:51.400 –> 07:56.480] freely when it’s threaded on the neck when the guitar is tuned up a string is
[07:56.480 –> 08:01.320] always is always perfectly straight so when the neck has a slight up bow there
[08:01.320 –> 08:05.360] should be a little bit free play between the string and the frets in the middle
[08:05.400 –> 08:11.280] so let’s put a capo on fret one again so it’s not only made for wonderwall also
[08:11.280 –> 08:15.840] for guitar tacking if I now fret the fret at the highest point where the neck
[08:15.840 –> 08:19.520] meets the body the string is perfectly straight now in the middle there should
[08:19.520 –> 08:24.360] be free play and a good way to check that is just hitting the string you
[08:24.360 –> 08:29.360] should hear a clacky sound because the string flicking on the neck you see
[08:29.360 –> 08:34.880] there’s no sound at all the string is now lying flat on the frets meaning the
[08:34.920 –> 08:39.400] guitar is having a back bow luckily we can easily fix this but we got to keep
[08:39.400 –> 08:43.520] our mind at it so imagine that the strings are trying to pull the neck this
[08:43.520 –> 08:48.560] way right and by fastening the rod we pull the neck the other way around so
[08:48.560 –> 08:53.160] by loosening the truss rods we give into the strings so the neck becomes more an
[08:53.160 –> 08:58.360] up bow and by fastening the truss rods we counter the string pool the other way
[08:58.360 –> 09:01.800] around so if you just think about it like that it’s easy to remember so right
[09:01.800 –> 09:07.760] we create more of a back bow left we create more of an up bow so the truss
[09:07.760 –> 09:12.840] rod on this SG is tightened too fast since there is a back bow so righty-tighty
[09:12.840 –> 09:18.440] lefty-loosey again let’s turn this one left and always do it with small
[09:18.440 –> 09:22.960] increments one-fourth
[09:23.520 –> 09:28.680] return the guitar see if we fix some of the issues
[09:33.640 –> 09:42.360] Wow so the problem is almost entirely gone now amazing there’s a little bit of
[09:42.360 –> 09:51.360] buzz still maybe you can hear it without a guitar so I’m giving it one-eighth of
[09:51.360 –> 10:00.200] a turn and that should be it final check
[10:00.200 –> 10:07.280] beautiful you see how such a small turn does so
[10:07.280 –> 10:17.120] much to the guitar that’s it so on your guitar the truss rod may be adjusted
[10:17.120 –> 10:21.440] with an Allen wrench always be a little bit careful when adjusting the truss rod
[10:21.440 –> 10:25.080] if it doesn’t move or there’s too much friction don’t overdo it over tighten it
[10:25.080 –> 10:28.440] because it can damage the guitar it always should feel very natural and
[10:28.440 –> 10:33.840] should move easily so we can also measure the gap with feeler gauges but
[10:33.840 –> 10:38.120] that’s not as easy as it sounds I prefer the tap test so let’s see if there is a
[10:38.120 –> 10:44.480] gap right now ah yes do you hear a tapping sound so that means there is a
[10:44.480 –> 10:51.360] gap between the string and the neck let’s do it over here yeah there’s two
[10:51.360 –> 10:58.080] so we fixed the neck awesome so if there’s too much of an up bow so too
[10:58.200 –> 11:03.840] much space in between the strings frets can buzz at the higher registers so we
[11:03.840 –> 11:07.200] need to fasten the truss rod a little bit more to see if the neck comes down
[11:07.200 –> 11:10.680] a little bit so if you fix the neck it’s time to get back to the action and see
[11:10.680 –> 11:14.640] if there are some things we can do it’s always a play between the neck and the
[11:14.640 –> 11:19.000] action you know to get it all right anyway let’s move on to another
[11:19.000 –> 11:23.400] adjustment that makes all the difference and let’s do that on the
[11:23.400 –> 11:31.880] thread because I was noticing some serious issues and I’m talking about the
[11:31.880 –> 11:36.880] intonation so this is basically that the pitch of every note is the pitch that it
[11:36.880 –> 11:42.360] should be sounds logical right but it’s not always that easy so if you hit that
[11:42.360 –> 11:45.420] high note and it sounds a little bit too sharp or you play a chord higher up the
[11:45.420 –> 11:49.160] neck and it sounds like out of tune that’s probably an intonation issue
[11:49.640 –> 11:54.480] there’s literally nothing more annoying so how do we fix that so at the bridge
[11:54.480 –> 11:59.400] of the guitar we see these saddles and they are movable and by doing so we make
[11:59.400 –> 12:03.920] the string longer or shorter and basically what we do is make sure that
[12:03.920 –> 12:09.320] fret 12 is exactly in the middle of the string so smack a new set of strings on
[12:09.320 –> 12:15.040] there so we can get clear measurements tune it up and play fret 12 fret and
[12:15.200 –> 12:21.000] play it gently just like you’re about to hit that like button right and now play
[12:21.000 –> 12:28.440] the harmonic too so we play a note we fretted fret 12 gently now we play the
[12:28.440 –> 12:33.760] harmonic so it should be identical in pitch and if you don’t trust your ears
[12:33.760 –> 12:42.040] just use a tuner so I’m hearing the fretted note is too low we go up in
[12:42.040 –> 12:47.860] pitch when you play the harmonic so the string is too long right now because the
[12:47.860 –> 12:51.480] longer string the lower the note the shorter the string the higher the note
[12:51.480 –> 12:56.080] so what we need to do to make the fretted note a little bit higher is move
[12:56.080 –> 13:01.760] the saddle that way very easy and this may look different depending on the kind
[13:01.760 –> 13:04.600] of bridge you’ve got I suggest lowering the string a little bit so the saddle has
[13:04.600 –> 13:10.200] more free play to move and just turn it so that the saddle moves towards the
[13:10.200 –> 13:16.020] headstock just do it with small increments tune up again let’s see if
[13:16.020 –> 13:23.760] we’re more in a ballpark that’s pretty close maybe it’s a little bit too low
[13:23.760 –> 13:26.120] still
[13:26.120 –> 13:41.100] so you see check readjust check again till you’re spot-on and now we do so for
[13:41.100 –> 13:45.440] every string and now your guitar will sound in tune no matter where you play
[13:45.440 –> 13:56.360] on the neck high and low more or less it’s still a guitar anyway so the
[13:56.360 –> 13:59.400] following is something that I discovered a while ago it’s the pickup height
[13:59.400 –> 14:03.840] number four so many pickups just sound so much better when they are a bit lower
[14:03.840 –> 14:09.080] than usually prescribed and that includes factory setup too and maybe it
[14:09.080 –> 14:13.480] has to do with the fact that volume generally impresses more than an actual
[14:13.480 –> 14:17.800] good tone so if you’re comparing two guitars in the store and the one sounds
[14:17.800 –> 14:22.200] louder you automatically think that will sound better but let’s do the test with
[14:22.200 –> 14:27.240] the Gibson ES 335 since I didn’t change those pickups yet I saw that these were
[14:27.240 –> 14:30.680] fairly high at the moment much closer to the strings than my Les Paul for
[14:30.680 –> 14:37.520] example so let’s see what happens when we adjust them so adjusting pickups is
[14:37.520 –> 14:42.440] super easy each pickup has two screws and just turn them down and always
[14:42.480 –> 14:49.120] remember how many turns you did so I’m lowering them by four whole turns and I
[14:49.120 –> 14:53.840] recorded this guitar earlier so let’s see how it compares
[15:42.440 –> 15:46.160] and I gotta say the pickup sounded nicer a little less spiky and more
[15:46.160 –> 15:50.560] balanced also these magnets negatively impact the strings the vibrating of the
[15:50.560 –> 15:55.800] strings so the less that happens the better just remember the position you
[15:55.800 –> 16:00.600] started from as always so you can always bring it back up but lower it till it
[16:00.600 –> 16:05.280] starts to sound thin and then bring it up a notch and you’re set what comes out
[16:05.280 –> 16:09.320] may shock you so really try it yourself as well leave in the comments what your
[16:09.320 –> 16:13.640] experience are with that so next up and that’s maybe the most important of all
[16:13.640 –> 16:19.520] the day-to-day number one fastening the bolts super important when I was still
[16:19.520 –> 16:23.320] teaching you wouldn’t believe the amounts of loose washers bolts and
[16:23.320 –> 16:27.440] screws I saw and by itself it isn’t too much of a problem but it can eventually
[16:27.440 –> 16:33.880] turn into way bigger problems so here’s a few things to regularly check and avoid
[16:34.320 –> 16:39.960] number one the strap button so if these become loose they will start to wiggle
[16:39.960 –> 16:45.440] and the small wiggle will turn into a bigger wiggle until eventually it will
[16:45.440 –> 16:50.200] literally fall out of the guitar meaning your instrument is on the floor and the
[16:50.200 –> 16:54.680] strap is hanging over your neck and we don’t want that right and another classic
[16:54.680 –> 17:01.440] the output jack or the output is loose and wiggles not too much of a deal you
[17:01.440 –> 17:05.280] say until the solder joints will become loose because all of that wiggling and
[17:05.280 –> 17:09.560] your signal is gone and if I learned one thing is that that happens the minute
[17:09.560 –> 17:14.040] you step on that stage next up loose washers and screws on the
[17:14.040 –> 17:18.920] tuners and this can cause major tuning instability check them and make sure to
[17:18.920 –> 17:23.440] not over tighten these be careful other than that there’s cleaning the fretboard
[17:23.440 –> 17:29.480] definitely not my favorite thing but this is what I use I’ve got bottles of
[17:29.480 –> 17:37.160] random sprays and oils this one is very good the magic potion I have no idea
[17:37.160 –> 17:42.320] what’s in it but I got it from my luthier from higher guitar shout out so
[17:42.320 –> 17:46.880] just do it whenever you change strings rub some oil in and just rub away the
[17:46.880 –> 17:51.480] excess dirt do it gently don’t damage the woods I use a microfiber cloth for
[17:51.480 –> 17:56.960] this dirty and use some general guitar care bottles that will treat your guitar
[17:57.040 –> 18:00.680] if you take care of your guitars as gently as you’re about to hit that like
[18:00.680 –> 18:04.920] button we’re all set leave your top guitar care tips in the comments or
[18:04.920 –> 18:09.120] share your thoughts about whatever you want down below and maybe this is a good
[18:09.120 –> 18:12.320] time to say how much I appreciate this community within building over the past
[18:12.320 –> 18:16.840] few years we’re closing in on 2 million and it’s just amazing thank you so much
[18:16.840 –> 18:20.480] catch you guys in the next one

Como fazer

Você pode usar o mesmo tutorial que eu (aqui), ou fazer o seguinte:

Primeiro você precisa de uma conta no Google.

Entre no Google Drive, vá em Novo e “conectar mais apps”

O passo seguinte é buscar por Google Colaboratory e instalar o aplicativo. A instalação será feita dentro do seu drive.

Agora vá mais uma vez no botão “Novo”, clique em “Mais”, e clique no Google Colaboratory.

Antes de começar a testar é necessário fazer uma pequena reconfiguração: clique em Ambiente de execução, e depois em Alterar o tipo de ambiente de execução:

Marque T4GPU

Agora vem a instalação do Whisper AI no Google Colaboratory. Clique na barra de texto ou em + Código para abrir a linha de comando:

Copie e cole essas duas linhas de código. Depois execute clicando no botão que parece de “play”

!pip install git+https://github.com/openai/whisper.git

!sudo apt update && sudo apt install ffmpeg

Arraste e jogue no menu lateral os vídeos ou áudios que você quiser transcrever. Achei o upload um pouco lento.

Agora bastar voltar novamente à linha de comando (+ Código) e digitar o seguinte:

!whisper “nomedoarquivo.formato” –model medium

No exemplo ficou:

!whisper “The ‘5-STEP SETUP’ every guitarist should know.mp4” –model medium –language English

Usei a determinação de linguagem do vídeo para poupar um pouco de tempo de processamento. No vídeo em português foi –language Portuguese

A Whisper AI coloca o texto decupado dentro da linha de comando (o que está colado acima) e ainda armazena no menu lateral versões txt, srt, json, tsv e vtt que podem ser baixadas.