• AVR Freaks

Hot!speech playback pictail

Author
robertbob
New Member
  • Total Posts : 8
  • Reward points : 0
  • Joined: 2019/09/14 10:30:43
  • Location: 0
  • Status: offline
2019/10/08 09:18:26 (permalink)
0

speech playback pictail

I have an explorer 16/32 development board. I have the extender for pictail daughter boards.
Is the speech playback pictail compatible with the explorer 16/32?
 
I read somewhere of a demo record and playback project that uses the speech playback pictail, but I cannot find the link to download the project. I do not see a microphone input on either the explorer development or speech playback daughter board
Does someone have that link? How do I record a message? 
#1

14 Replies Related Threads

    du00000001
    Just Some Member
    • Total Posts : 3075
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: online
    Re: speech playback pictail 2019/10/08 15:58:27 (permalink)
    0
    Assuming it's the speech playback pictail plus, about everything you asked is answered on the product page:
    https://www.microchip.com...roductDetails/AC164125
    (just visit all the tabs)
     
    For audio recording, one of the ADC inputs, maybe with an additional external amplifier, should do.
    Beyond that, you're free to store pre-recorded speech in the serial EEPROM.

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #2
    robertbob
    New Member
    • Total Posts : 8
    • Reward points : 0
    • Joined: 2019/09/14 10:30:43
    • Location: 0
    • Status: offline
    Re: speech playback pictail 2019/10/13 10:42:42 (permalink)
    0
    Thanks du!
    I found the link to dsPIC G.726A Speech Encoding/Decoding Library:
    https://www.microchip.com/SWLibraryWeb/product.aspx?product=G.726A%20Speech%20EncodingDecoding
     
    Is this library compatible with the dsPIC33CH128MP508 PIM I have?
     
    I downloaded the G726A v3.0 zip fiile, there are demo programs, but MPLAB X IDE does not see a project to load. Are these demos set up for MPLAB?
     
    I am looking for some direction, should I just use the sample ADPCMDecoder funcition (AN643, Appendix C)?
     
    Is there any tool that will allow me to encode from a PC?
     
    thanks in advance
     
     
     
    #3
    robertbob
    New Member
    • Total Posts : 8
    • Reward points : 0
    • Joined: 2019/09/14 10:30:43
    • Location: 0
    • Status: offline
    Re: speech playback pictail 2019/10/13 11:17:01 (permalink)
    0
    sorry, what I meant to ask is if there was a tool that would take the the encoded data and create a table that could be used by the AN643 ADPCMDecoder?
     
    AN643 Appendix E has a flowchart. Is there a demo project for this program?
     
     
     
    #4
    du00000001
    Just Some Member
    • Total Posts : 3075
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: online
    Re: speech playback pictail 2019/10/13 12:06:23 (permalink)
    0
    G726A is attributed to dsPIC 30F, 33F and 33E - not (yet) 33C. But I expect that a port to 33C shouldn't be that difficult. Haven't yet checked what's within the installer exe...
     
    As AN643 provides generic code for encoder/decoder, this should compile on a 33C as well.
    The application example (flow chart) is somewhat different, as systems implementing this can vary greatly. But it is possible to create your own application by just following the flow step by step.
    Don't think a converter utility is readily available. Using e.g. Perl, writing a converter of your own shouldn't be too difficult as well: just read the ADPCM file as input and output a piece of C containing a valid C source to initialize some ROM (const) variable. Just check the maximum size constraint for such arrays.

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #5
    robertbob
    New Member
    • Total Posts : 8
    • Reward points : 0
    • Joined: 2019/09/14 10:30:43
    • Location: 0
    • Status: offline
    Re: speech playback pictail 2019/10/14 10:33:42 (permalink)
    0
    Sorry du, I am just a little overloaded: new MPLAB, new processor, new development kit, speech daughter board. I was looking for a project like The disPIC33CH128MP508_PIM project in the explorer 16/32 demo that I downloaded from the explorer 16 /32 development kit page. It does not look like there is a resource like that for the speech board.
     
    When I convert the playback demo to the new MPLAB X IDE, it does not compile because it does not find p33Exxxx.h. 
    I cannot find it in the downloaded directories.
    #6
    du00000001
    Just Some Member
    • Total Posts : 3075
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: online
    Re: speech playback pictail 2019/10/14 11:28:31 (permalink)
    0
    Over the years, the IDE changes somewhat  :)
    Resulting in the necessity for some very small adaptations.
    Try
    #include <xc.h>

    replacing the
    #include <p33Exxxx.h>


    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #7
    robertbob
    New Member
    • Total Posts : 8
    • Reward points : 0
    • Joined: 2019/09/14 10:30:43
    • Location: 0
    • Status: offline
    Re: speech playback pictail 2019/10/15 10:02:38 (permalink)
    0
    That was a great suggestion as the file errors cleared. When p33exxxx.h was replaced in the meb.h file, there are several compilation errors. Several constants such as _ANSC1, ANSC2, were not defined, but other constants such as _TRISC1 and _LATC1 are defined. Since  the ANSC1 and ANSC2 bits are not defined in the dspic33c, I am surprised that they are defined in the dspic33e.
     
    post edited by robertbob - 2019/10/15 10:07:38
    #8
    du00000001
    Just Some Member
    • Total Posts : 3075
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: online
    Re: speech playback pictail 2019/10/15 10:18:50 (permalink)
    0
    ?ANS_X_Y (translates to ANSEL#port#bit) are highly hardware-specific: which ports alternatively offer analog input capabilities differs between families. Just make sure that the ports your ADC inputs are attached to remain analog-enabled (ANSELx == 1), while all digital inputs become analog-disabled (ANSELx == 0).
    (?LAT_X_Y are basically hardware-specific as well, but differences are usually smaller.)

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #9
    robertbob
    New Member
    • Total Posts : 8
    • Reward points : 0
    • Joined: 2019/09/14 10:30:43
    • Location: 0
    • Status: offline
    Re: speech playback pictail 2019/10/17 09:01:03 (permalink)
    0
    I tried to follow the Record Play Demonstration in the dspic dsc g.726a speech encoding decoding library user's guide paragraph 3.2.3. FIGURE 3-1 shows a board with mic input, the Audio PICtail Plus Daughter Board.
     
    What is this board's part number?
     
    The guide keeps referring to the Multimedia Expansion Board (MEB) but the figure shows something like the Explorer 16/32 board and a pictail daughter board, but not the MEB. 
     
    What am I missing?
     
    Since I have the Speech Playback PICtail™ Plus Daughter Board that does not have a microphone, I could follow the Playback Demonstration in the user guide paragraph 3.2.2. It directs to create a .s file using the G.726A PCEU utility. I created a small test file (7 seconds). The utility shows 60 KB .s data file generated but the disk file is 238 KB long. 
     
    Does the disk file have that much overhead? I mean after compilation will it only take up 60 KB of memory?
     
    What is the AWG726ADecoder file in the PCEU directory? I tried to run it and a dos window showed but was immediately closed.
     
     
    #10
    du00000001
    Just Some Member
    • Total Posts : 3075
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: online
    Re: speech playback pictail 2019/10/17 10:00:26 (permalink)
    0
    Let me answer some of your questions without any peculiar order...

    Does the disk file have that much overhead?

    The utility might indicate "60 kB of data" - resulting in an .s file that's way larger. (.s is for assembly source files - you can open it with the editor of your choice.) So a 238 kB .s file doesn't come as a real surprise.
     
    Re MEB vs. Speech Playback PICtail Plus board
    ==============================
    The MEB did hold way more hardware, but when it comes to the audio capabilities, it might be equivalent. (I didn't check in detail, but this is to be expected. I wouldn't bother too much...)
    Having browsed the 726A package's documentation: the package seems to be supporting the MEB as well as the PICtail. Seems you have to make sure you #include the appropriate headers (MEB.h vs. explorer16.h). The corresponding codec header might be included via the board header.
     
    Re AWG726ADecoder(.exe)
    ==================
    Open a static "DOS box" and "cd" to the directory of the .exe. Then type AWG726ADecoder [RETURN]  wink
    (Assuming your Win version is between Win98 and Win7. Although the exe might run under Win10 as well.)
    This should enlighten you.
     
     

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #11
    robertbob
    New Member
    • Total Posts : 8
    • Reward points : 0
    • Joined: 2019/09/14 10:30:43
    • Location: 0
    • Status: offline
    Re: speech playback pictail 2019/10/20 17:39:09 (permalink)
    0
    1. I ran awg726adecoder and this is what i get:
     
    C:\G726Av3.0\PCEU>awg726adecoder
    > Usage:
    $ G726demo Transf Rate InpFile OutFile
    where:
    Rate is the number of ADPCM bits per sample:
    [5],[40] -> 5 bits per sample (40 kbit/s)
    [4],[32] -> 4 bits per sample (32 kbit/s)
    [3],[24] -> 3 bits per sample (24 kbit/s)
    [2],[16] -> 2 bits per sample (16 kbit/s)
    InpFile is the name of the file to be processed;
    OutFile is the name with the processed data;
    -? or -help print this help message
     
    Do I need to process the .s file with this program?
     
    2. I was able to download the explorer16_demo_2019_06_07.zip file and use the dspic33ch128mp508_pim project that is in the zip file as a basis for an user interface using the pushbuttons, leds, and lcd. I successfully compiled, downloaded, and tested my project. I searched that project for an explorer16.h file and could not find it. I think you may be talking about one of the .h files in xc.h which is selected by the defined processor. For instrance, the dspic33ch128mp508_pim project uses the p33CH128MP508.h header by including xc.h. Is there another header that I should include?
     
    3. I re-downloaded the G726A.zip file and imported the Playback legacy file (first I removed the spaces in the file names and folders so I would not get the warning). I picked the dsPIC33 family and the dsPIC33EP128GP506 device. I am using the xc16 compiler v 1.41. The project imports without error. I changed all occurrences of p33Fxxxx.h to xc.h as you suggested. When I build the project there are several errors. 
    the first is ../src/WM8731CodecDrv.c:358:2: error: 'DCICON1bits' undeclared (first use in this function).
    I would expect it to be one of the registers. I searched for DCICON in the dsPIC33E and the dsPIC33C data sheets, it is not there. could it be defined somewhere else.
     
    4. I did not realize the Playback Demonstration procedure in the user guide paragraph 3.1.2.3 uses 2 sets of boards. Is this really necessary?
    #12
    du00000001
    Just Some Member
    • Total Posts : 3075
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: online
    Re: speech playback pictail 2019/10/20 19:16:27 (permalink)
    0
    1. I doubt that. But if you have an appropriate .s file: why not just try it?
    2. I've been talking about the AN 726 zipped package. I expect an explorer16.h to be found there. Including xc.h is expected to include the appropriate header file for your specific microcontroller derivative.
    3. Is the WM8731 the encoder on the PICtail? If so, you should look for DCICON* in the dsPIC33F headers and replace this interface with what's available on the dsPIC33E resp. C.
    4. To use the playback demo "as is": certainly. Otherwise - following some analysis - you might be able to use a PC or some microcontroller as the data source.
    Obviously quite some work to do...

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #13
    robertbob
    New Member
    • Total Posts : 8
    • Reward points : 0
    • Joined: 2019/09/14 10:30:43
    • Location: 0
    • Status: offline
    Re: speech playback pictail 2019/10/21 17:56:30 (permalink)
    0
    Thanks again
     
    2. AN726 is the PIC17CXXX to PIC18CXXX Migration note, so I did not think it applied. I am attempting a dspic33E or F to dspic33C migration.
     
    3. I did find DCICON defined in several include files, but I do not see it defined on the data sheet, and it is only defined in some of the include files.
     
    As a starting point, I would like to be able to compile the demo program, but it looks like I will never figure out the files that need to be included in the build. I am beginning to think the dspic33E and dspic33F processors are not compatible with the code. (well at least the dsPIC33CH128MP508 PIM I have)
     
    At any rate, I will try to compile using a dspic33F device instead of dspic33E.
     
    Do you know of any other resources to get this project compiled?
    #14
    du00000001
    Just Some Member
    • Total Posts : 3075
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: online
    Re: speech playback pictail 2019/10/22 01:18:37 (permalink)
    0
    You're really trolling around:
    • DCICON(1) is available e.g. on the dsPIC33FJxxGP derivatives. So if you get one of tbese datasheets...
    • Even if G726A wasn't written for dsPICs: you can port everything to a higher-end controller that doesn't require specialized hardware not available on the latter. Provided you've got the ability . . .
    • A CH is neither an E nor an F type. Defining an FJ derivative as the controller used should allow you to compile the demo. Won't run on your CH PIM, but should be brought to build successfully.

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #15
    Jump to:
    © 2019 APG vNext Commercial Version 4.5