Playng PCM sound

10 thoughts on “Playng PCM sound

  1. I need to play pre-recorded sounds and voice messages to audio channel or speaker.

    Which file format I have to use for sound storage in module memory: .wav or something else, taking in mind that sound will be recorded in my PC by microphone and converted to PCM.

  2. I red it first. 

    I can record PCM from microphone or audio channel, but I need something else – to prepare short voice notificatiom messages, such as "Warning! Battery is low" in PC and transfer to module. So 8bit / 8kHz / mono sampling is clear but what file formant to use in PC to have possibility to read it and play in module.

     

    Microphone record (ambient noise without speech) contains 0x00s and 0xFFs mixed in (by my opinion) randomly. Speech gives other values.

     

  3. So I have to convert recorded sound to WAV PCM and seve to module.

    The python program will open end read that file and will send its contents to speaker or audio channel? 

    1. Produced with what? Can you attach the file (try to change the file extension with .pdf for example).

      1. Sorry, yesterday late evening I found my mistake. 2 sec record is exactly 16044 bytes – 16000 samples and 44 bytes file header.

         

        I have to record separate words in files or in separate lines in one file in memory and read them in string variables or dictionary and play with related pause.

         

        Thanks Cosmin.