Skip to content

Instantly share code, notes, and snippets.

@Leticia-Carraro
Last active September 21, 2021 00:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Leticia-Carraro/ae68762008d19f9e15cb68cc4978911c to your computer and use it in GitHub Desktop.
Save Leticia-Carraro/ae68762008d19f9e15cb68cc4978911c to your computer and use it in GitHub Desktop.
Esse código calcula a taxa de amostragem e o número de canais de um áudio no formato wav
def taxa_de_quadros(nome_arquivo_audio):
with wave.open(nome_arquivo_audio, "rb") as wave_file:
taxa_quadros = wave_file.getframerate()
canais = wave_file.getnchannels()
return taxa_quadros,canais
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment