PCM sound samples - is it possilbe to play some on espruino? #4992
Replies: 1 comment
-
Posted at 2021-05-20 by @gfwilliams Yes, absolutely - it'll even handle more than one at once: https://www.espruino.com/Waveform Posted at 2021-05-20 by JumJum Could this be something for you ? Posted at 2021-05-21 by bigplik how is possible to stop that file after playing? I noticed that after playing a sample espruino has some clicking/biping (noice) in my project I need to play some animal sounds samples after button pressed, is 4000Hz max quality I can get by espruino? Posted at 2021-05-21 by Robin Fri 2021.05.21
I noticed this was posted beneath: 'Pico / Wifi / Original Espruino' To confirm, which of the STMicroelectronics, Nordic Semiconductor or Espressif chips, or which specific board is the inquiry for? Posted at 2021-05-22 by bigplik Espruino Original is what i use for this project, just for try, but for the final I would swap to pico or MDBT42Q Posted at 2021-05-22 by bigplik I am afraid it is not working as smoothly as on esp32 or even arduino uno, Posted at 2021-05-22 by Robin Sat 2021.05.22 Found this: Now on the Pico: 'While the highest sampling rate I achieved with SD card was between 12 and 15 KHz, I can stream at 44.1 KHz from the flash RAM' Posted at 2021-05-22 by bigplik what is the highest rate on Original espruino? Posted at 2021-05-22 by Robin Sat 2021.05.22
What process is being used for recording the original content? I've just connected a mic and recorded straight to Audacity at around the same rate ~32kB as CD's are recorded. That said, I haven't used that Audacity output with how that tutorial presents. Does this assist with configuration?
Posted at 2021-05-22 by bigplik I have some mp3 samples from internet. I use audacity to decrease rate to 4000Hz but without success, any file I convert by audacity to raw file doesn't work from TF card. There is only some noice. When I use code for short files to run without TF card it is working only with Gordon's code from the web, but not when I convert my files by converter provided here https://www.espruino.com/File+Converter Posted at 2021-05-22 by Robin Sat 2021.05.22 It has been a few years since I've used the Waveforms examples, link in post #2 and the Converting files to Strings, link in post #11 which went with success and many are currently using those examples also. My version of Audacity defaults to 8000Hz. Has that option been tried while changing the rates within the code snippet? Which examples do work and which fail from the Waveforms page? Are you using the code snippet beneath: 'You can output a Sound file' ?
Although I don't have the hardware to test in this case, I'd be willing to at least go through the conversion process you are using to see if the converted outputs match. Which format is being selected in the DDL box on the File Converter page, and would you mind uploading a small source sample, along with the options being used to create the Audacity output, the raw Audacity converted file and the output from the File Converter. A screen shot of the Audacity Preferences modal dialog would speed my configuration. From a positive match between our steps, others may be able to quickly zoom into other possible areas to consider. Posted at 2021-05-23 by bigplik First I convert my file in Audacity 3.0.2. from mp3 to 16-bit PCM. Then make it mono, next decrease the rate down to 4000Hz, after that i export it and choose "Other Uncompressed files" then Choose "RAW (header-less)" and "Unsigned 8 bit PCM". After that I use this converter Next use this code
to play it. Posted at 2021-05-23 by bigplik raw sample Posted at 2021-05-23 by @MaBecker Wow, can you please share size of file and play duration? Posted at 2021-05-23 by bigplik raw file size is 15KB |
Beta Was this translation helpful? Give feedback.
-
Posted at 2021-05-20 by bigplik
Hi, I need to make some simple PCM sound sample player, just several samples of animal sounds. It is possilbe to do it on arduino avr, but I need more flash.
I wonder if that is possible to play that on espruino?
Beta Was this translation helpful? Give feedback.
All reactions