-
Notifications
You must be signed in to change notification settings - Fork 147
Translation to pt-BR: chapter0, chapter1 #182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I redo the PR to fix some internal organization of commits. |
|
Great. |
|
Amazing Job! |
|
Great job!! |
Vaibhavs10
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really sorry for the delay here @rrg92 - getting this prioritised ASAP.
|
Thank you @Vaibhavs10!!! |
gante
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Obrigado pelo PR 🤗
I've added a few minor nits, but in general the translation is very good -- hence the approval!
@Vaibhavs10 please double-check the technical bits of the course, like the _toctree, as I am not familiar with them
|
|
||
| E se quisermos ver como as frequências em um sinal de áudio mudam? O trompete toca várias notas e todas elas têm frequências diferentes. O problema é que o espectro mostra apenas "uma foto" das frequências em um dado instante. A solução é fazer várias DFTs, cada uma cobrindo apenas uma pequena fatia de tempo, e empilhar os espectros resultantes formando um **espectrograma**. | ||
|
|
||
| Um espectrograma mostra o conteúdo da frequência de um sinal de áudio à ao longo do tempo. Ele permite que você veja tempo, frequência e amplitude tudo em um único gráfico. O algoritmo que realiza esse cálculo é o STFT (Short Time Fourier Transform) ou Transformada de Fourier de Tempo Curto. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Vaibhavs10 nitpicking: the original sentence behind, O algoritmo que realiza esse cálculo é o STFT (Short Time Fourier Transform) ou Transformada de Fourier de Tempo Curto, The algorithm that performs this computation is the STFT or Short Time Fourier Transform., is not entirely correct.
There are multiple ways to obtain a spectogram, with their precision pros and cons (see paragraph 3 in the wiki entry, or the 2nd paragraph in the generation section on the same wiki page).
We should rephrase it into something like The algorithm that we'll use to perform this computation (...)
[I had a whole PhD-level class on estimators and spectrograms and I regret knowing this piece of trivia 😅 ]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed, but STFT is the most prominent one in generative audio space :p
|
|
||
| O espectrograma é criado obtendo trechos curtos do sinal de áudio, geralmente durando alguns milissegundos, e calculando a transformada de Fourier discreta de cada trecho para obter seu espectro de frequência. Os espectros resultantes são colocados em sequência eixo do tempo para criar o espectrograma. Cada fatia vertical nesta imagem corresponde a um único espectro de frequência, como se o gráfico fosse girado. Por padrão, `librosa.stft()` divide o sinal de áudio em trechos de 2048 amostras, o que dá um bom equilíbrio entre resolução de frequência e resolução de tempo. | ||
|
|
||
| Como o espectrograma e a forma de onda são visualizações diferentes dos mesmos dados, é possível transformar o espectrograma de volta na forma de onda original usando a STFT inversa. No entanto, isso requer a informação de fase, além da amplitude. Se o espectograma foi gerado por um modelo de machine learning, geralmente ele contém só as amplitudes. Neste caso, nós podemos usar um algoritmo de reconstrução de fase como o clássico algoritmo de Griffin-Lim ou usar uma rede neural chamada vocoder, que reconstroi a forma de onda partir do espectograma. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Vaibhavs10 nitpicking: contrarily to what's stated in the original version of the course, the vocoder is not a neural network, but rather a signal processing method. Actually, it predates neural networks (1928 vs ~1940).
We should correct the original version 🤗
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can fix this a bit later on the original version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I fix and replace the vocoder with a signal processing method instead of a neural network Or wait for the original update?
|
|
||
| ## Espectrograma | ||
|
|
||
| E se quisermos ver como as frequências em um sinal de áudio mudam? O trompete toca várias notas e todas elas têm frequências diferentes. O problema é que o espectro mostra apenas "uma foto" das frequências em um dado instante. A solução é fazer várias DFTs, cada uma cobrindo apenas uma pequena fatia de tempo, e empilhar os espectros resultantes formando um **espectrograma**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Vaibhavs10 nitpicking: The solution is to take multiple DFTs (...) -> One of the solutions (...)
(see below, there are non-dft spectograms)
|
|
||
| Criar um espectrograma mel é uma operação com perda, pois envolve filtragem do sinal. Converter um espectrograma mel de volta | ||
| em uma forma de onda é mais difícil do que fazer isso para um espectrograma regular, pois exige a estimação das frequências | ||
| que foram descartadas. É por isso que modelos de aprendizado de máquina como o vocoder HiFiGAN são necessários para produzir uma forma de onda a partir de um espectrograma mel. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rrg92 consistency: let's always use "machine learning" or "aprendizado de máquina" ("machine learning" is more friendly to non pt-BR Portuguese readers 🤗 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, this passed in my review... I tried to keep the maximum number of original English terms, because I agree with you... some original English terms are much friendlier than their translations. This is one of them.
|
|
||
| Então, o que um extrator de características faz com os dados de áudio brutos? Vamos dar uma olhada extrator de características chamado [Whisper](https://huggingface.co/papers/2212.04356) para entender algumas transformações comuns de extração de características. Whisper é um modelo pré-treinado para reconhecimento automático de fala (ASR) publicado em setembro de 2022 por Alec Radford et al. da OpenAI. | ||
|
|
||
| Primeiro, o extrator de características do Whisper preenche/corta um grupo (batch) de exemplos de áudio de forma que todos os exemplos tenham uma duração de 30s. Exemplos mais curtos que isso são complementados com zeros no final, até formar 30s de duração (zeros em um sinal de áudio correspondem a silêncio ou nada de sinal). Exemplos que tem mais de 30s são cortados nos 30s. Uma vez que todos os elementos no grupo são padronizados para uma duração fixa, não há necessidade de uma máscara de atenção (attention mask). O Whisper é único neste aspecto, a maioria dos outros modelos de áudio requer uma máscara de atenção que detalha onde as sequências foram preenchidas, e assim onde elas devem ser ignoradas no mecanismo de auto-atenção (self-attention). O Whisper é treinado para operar sem uma máscara de atenção e inferir do próprio sinal onde ele deve ignorar. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rrg92 bom uso de parêntesis para explicar teminologia na linguagem original! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Obrigado @gante . Algumas traduções eu fiquei bem na dúvida se traduzia ou não. Tentei pesquisar em alguns artigos acadêmicos aqui do Brasil para ver o que o pessoal costuma usar... Como vi as duas, então tentei manter os dois termos para facilitar o entendimento de todos.
Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>
Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>
Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>
Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>
|
@gante , Do I need to resolve all conversations to proceed? |
|
@rrg92 let's wait for @Vaibhavs10 on the items he was tagged |
Vaibhavs10
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @gante - everything else looks good to me, on the technical side/ language changes, we'd do a sprint a bit later in the quarter to fix, so far there's a bandwidth crunch, if it's okay then let's proceed to merge as is and then refine a bit later.
|
Thank you so much @Vaibhavs10 and @gante. The progress of this PR is very important to the pt-BR community. I will proceed with the remaining chapter translations. If there are any changes needed in process, please feel free to contact me. I will keep track in issue #173 |
Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>
Hello everyone!
These are the first translations of the audio course into Brazilian Portuguese!
I ask you to check if the PR is okay and if the files are correctly organized, as per the documentation provided.
I ran the 'make style' script, which executed without generating any errors.
I was able to use the doc-builder preview and navigate through the translated course!
Translated: chapter0 and chapter1