Professional Documents
Culture Documents
Read This First
Read This First
The sequence of steps to execute the scrit of Vocoder is the following one:
- First, it is recommendable that in the same folder where you have the programs Cosubf.m
and Decosubf.m you must have the audio file of compressing.
The original archives WAV to analyze are sampled to 44100 Hertz, 8 bits, 1 channel
(mono) and PCM.
If you want to use .wav archives of less frequency of sampling (for example 22 KHz or 11
KHz) you must modify
the number of points of the "window time". For example, for a file of 44100 Hertz of
sampling frequency, a window
of 880 data is used, that correspond approximately 20 milliseconds. It's means if you vary
the sampling frequency, you must modify the number of points by time window.
- Soon, in the command line, you have to execute "decosubf(salida)". So, flames to script
decompression valve, with the name of the variable
where the powers obtained in cosubf estan. The progress of the program is in the number
of analyzed window of time (nv).
It remembers that according to the size of the file, you will have time windows more or
less.
- When finishing executing the file decosubf, is due to have created a called file
"descom.wav", that corresponds to the audio one decompressed
and corresponds to the sum of sinusoidal with the weights of the powers obtained in the
sub-bands of frequency (in each filter) within each window of time.
That decompressed file generally equal weight to the original file, but not always, since in
the last window they are had generally less than 880 points.
You will notice that it sounds synthetic, because is an approach of the original file, on the
basis of sum of sine.
I have the code in C for implementing a Vocoder in real time (for platform DSP Texas
Instruments DSK TMS320C6711). If you want it, write me an e-mail.
If you use the code, you do not forget to put to me within your references, please.
Greetings.
Castellano:
- Primero, es recomendable que en la misma carpeta donde tienes los programas Cosubf.m
y Decosubf.m debes tener el archivo de audio a comprimir.
Los archivos .WAV originales a analizar estan muestreados a 44100 Hz, 8 bits, 1 canal
(mono) y PCM. Si quieres utilizar archivos .wav de menos frecuencia de muestreo (por
ejemplo 22 KHz o 11 KHz) debes modificar el número de puntos por ventana de tiempo.
Por ejemplo, para un archivo de 44100 Hz de frecuencia de muestreo, se utiliza una ventana
de 880 datos, que corresponden aproximadamente 20 milisegundos. Es decir, si varías la
frecuencia de muestreo, debes modificar el número de puntos por ventana de tiempo.
- Ejecutas en la linea de comandos de Matlab: " cosubf " . Deberias ver al final el
porcentaje de compresión y la potencia espectral normalizada, junto con la respuesta en
frecuencia de un filtro pasabanda. El archivo comprimido queda guardado en una variable.
En este caso, queda en la variable "salida" (que es un vector columna). Si ejecutas el
comando "whos" en la linea de comandos de Matlab, podrás ver el tamaño de las variables.
Si quieres almacenar el archivo comprimido, debes agregar lineas al código que hagan un
fwrite de la variable. Sin embargo, yo no guardo en un archivo la variable "salida", ya que
la descomprimo inmediatamente. El programa te muestra el porcentaje de compresión al
terminar de ejecutar el script "Cosubf". Puedes verificarlo haciendo el comando "whos".
Notarás que suena sintético, debido a que es una aproximación del archivo original, en base
a sumas de senoidales.
Las lineas comentadas son para poder paso a paso las potencias de las sub-bandas de
frecuencia en cada ventana de tiempo. No influyen en el resultado final.
Tengo los códigos en C para implementar el Vocoder en tiempo real. Estan escritos para la
plataforma DSP Texas Instruments DSK TMS320C6711. Si los quieres, escríbeme un e-
mail.
Saludos.