But i did fail. Melp seems to need 30kb ram, while the f103 provodes only 8kb. Is there ans cheapo board with 32kb ram like the blue board?
Doesent really help me, i still need more ram, or someone to crunch the codes ram usage.
It does store coeffs in 32bit int or float, even the voice samples, but changing this will be hard.
————
Arduino: 1.6.3 (Windows 7), Board: “Generic STM32F103C series, STM32F103C8 (20k RAM. 64k Flash), STM32duino bootloader”
c:/users/i7-4790/appdata/roaming/arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/bin/ld.exe: C:\Users\I7-4790\AppData\Local\Temp\build1072652885461977077.tmp/melp.cpp.elf section `.data’ will not fit in region `ram’
c:/users/i7-4790/appdata/roaming/arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/bin/ld.exe: region `ram’ overflowed by 8216 bytes
collect2.exe: error: ld returned 1 exit status
Error compiling.
————
Given the relatively low bandwidth required, you might be able to use an external flash chip for buffering
Using 8 bit rather than 32 bit samples might also work, as might decreasing the size of the buffer, but without any code to look at, I can’t really say.
You could also try running the code on an ESP8266, as they should have more RAM.
https://github.com/arash-ostadzadeh/QUA … ks/melp1.2
I have used the codec before. Its from 1993-1995, TI, development paid by the US. Excellent code. Way better than what i am able to do and understand. Dont underestimate melp just because its old.
I did reduce the size to 17kb of ram by changing 2 tables from float to int16. One table is no problem, but the other one needs to be scaled. I will try to test it on my arduino due (more ram), but i need the 8khz DA and AD code first, and i need the mic and speaker hardware, plus some way to store the encoded speech.
Sounds like it may be possible to use an ESP8266 (sans WiFi) at 160MHz. Plenty of SRAM
Short write-up here
Ray
http://web.stanford.edu/class/cs343/res … purify.pdf
https://en.wikipedia.org/wiki/Rational_Purify
-rick
-rick
$ ./melp -i input/sample.pcm -o sample.bitfile
the sample.bitfile wasn’t very small. I was expecting it to shrink.
What is the sample rate of the input/sample.pcm ? Did I miss that someplace in the docs? Seems like 8k works OK.
-rick
- massif.txt
- (22.98 KiB) Downloaded 47 times
#define audbuffsize 180
float rfbuf[audbuffsize];


