Shop OBEX P1 Docs P2 Docs Learn Events
Gadget Ganster Tutorial TTS — Parallax Forums

Gadget Ganster Tutorial TTS

HumanoidoHumanoido Posts: 5,770
edited 2011-02-28 21:43 in Propeller 1
http://gadgetgangster.com/tutorials.html
Text-To-Speech

What's the trick to making this work on the Parallax Demo Board?
My keyboard works fine with Femtobasic and the sound out works
fine with other programs.

I am not able to see the video at the web site, maybe
there's some start-up procedure?

Comments

  • StefanL38StefanL38 Posts: 2,292
    edited 2011-02-27 12:55
    somebody ask on the gg tutorial how do to it without keyboard user input

    here is a modified demo-code
    CON
      _clkmode = xtal1 + pll16x
      _xinfreq = 5_000_000
      soundpin = 11
    
    OBJ
     t    : "talk"
     
    VAR
      BYTE typetext[64]
    
    
    PUB start | i
    
      t.start(soundpin)
      t.set_speaker(0,140) '
    
      repeat
        waitcnt(CLkFreq * 2 + cnt)
        t.say(@DemoText)
        waitcnt(CLkFreq * 3 + cnt)
        t.say(@HAL9000)
    
    
    DAT
      DemoText byte "h", "e", "l", "l", "o", " ", "w", "o", "r", "l", "d",0 
    
      HAL9000 byte "h", "a", "l", "n", "a", "e", "n", "t", "h", "o", "u", "s","a", "n", "d", 0 
    

    for easier use there should be add a method that could be used in that way

    repeat until talk.finished
    which becomes true if saying has finished the last string.

    and as you can see from the spelling the formants have to be improved a lot
    a second stage would be to do some more analysing of the phonems
    where to let the letters sound more realistic
    I mean the difference between f.e. the "o" in "moon" and "monday" and "oh!"
    This will cost RAM I know but I would like to have such a version

    maybe this could be done by a pre-compiler that rearranges the spelling depending on the phonems

    best regards

    Stefan
  • Invent-O-DocInvent-O-Doc Posts: 768
    edited 2011-02-27 13:02
    Don't know humanoido. Then pin outs are the same as the demo board so it should work.
  • HumanoidoHumanoido Posts: 5,770
    edited 2011-02-28 00:38
    The problem is the array is not working.
    If you bypass this, as in StefanL38 program above, it works fine to say single sounds.

    The problem is here
    repeat
      typetext[i] := kb.getkey
      IF typetext[i] == $0D
        t.say(@typetext)
        i := -1
      i++
    

    Not sure how that should work but if you delete some lines it works like this:
    repeat
      typetext[i] := kb.getkey
        t.say(@typetext)
    

    Any explanation on this?
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-02-28 01:07
    The Gadget Gangster tutorial misrepresents my phonemic speech generation object as text-to-speech. It is not, and I'm afraid that making such a claim will mislead people into believing that if they type "hello world", that's what will come out. Not only do the phonemes need a lot of additional work before the speech is intelligible, but automatically converting English text to a phonemic representation is a huge project in and of itself. Only if and when that is accomplished will the term "text-to-speech" apply. But, right now, it's nowhere close to that and shouldn't be identified as such.

    -Phil
  • HumanoidoHumanoido Posts: 5,770
    edited 2011-02-28 02:14
    The Gadget Gangster tutorial misrepresents my phonemic speech generation object as text-to-speech. It is not, and I'm afraid that making such a claim will mislead people into believing that if they type "hello world", that's what will come out. Not only do the phonemes need a lot of additional work before the speech is intelligible, but automatically converting English text to a phonemic representation is a huge project in and of itself. Only if and when that is accomplished will the term "text-to-speech" apply. But, right now, it's nowhere close to that and shouldn't be identified as such. -Phil
    Phil, this is understandable - indeed the words "text to speech" are applied in a very loose way. Perhaps calling it a vocal sound demo would be more accurate semantically.

    So can anyone answer the question, "why does the code not run on a Demo board and how to fix the array?" Perhaps Nick can respond.
  • Nick McClickNick McClick Posts: 1,003
    edited 2011-02-28 10:26
    @Humanoido - not sure why it's not working for you. I don't have the hardware setup right now, but does it sometimes work for you or never? One bug might be the lack of zero-terminator when it's filling the string to be spoken, but you'll still hear something out of the speakers. Are the input strings over 64 characters?

    @Phil - I've fixed the page. I thought of it as text-to-speech because you can feed it input text and it will accurately spell it out for you, but I don't want to mislead anyone into thinking this will accurately pronounce any text string.
  • Nick McClickNick McClick Posts: 1,003
    edited 2011-02-28 10:47
    @humanoido - just set up my demo board and I was unable to duplicate your issue - Only thing I can think of is maybe you're entering more than 64 characters.
  • HumanoidoHumanoido Posts: 5,770
    edited 2011-02-28 17:10
    @humanoido - just set up my demo board and I was unable to duplicate your issue - Only thing I can think of is maybe you're entering more than 64 characters.
    Nick, thanks for trying it on a Demo Board. Please explain in detail how it should work. Tell me exactly what to type and I will try it and duplicate it. Since I could not access the video, perhaps some important information is missing, like press a specific key to make it sound off.
  • Nick McClickNick McClick Posts: 1,003
    edited 2011-02-28 17:37
    1 - Load code
    2 - Plug in keyboard & headphones
    3 - Type something into the keyboard - try 'hello world'.
    4 - Hit the enter key

    Audio will come out of the headphones. Maybe you're missing the enter key?
  • HumanoidoHumanoido Posts: 5,770
    edited 2011-02-28 21:43
    1 - Load code
    2 - Plug in keyboard & headphones
    3 - Type something into the keyboard - try 'hello world'.
    4 - Hit the enter key
    Audio will come out of the headphones. Maybe you're missing the enter key?
    Thanks Nick.
Sign In or Register to comment.