#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    4
    Rep Power
    0

    Read out loud in php


    Hello,

    I am trying to write something in php to read the english out loud.

    That means, If i write in the code 'apple' , when I click Play, it reads out as apple so i can hear it. Is it possible to do it in php?

    Thanks.

    -b
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2003
    Posts
    3,501
    Rep Power
    594
    That needs to be done on the client side (browser). PHP is a server side language (outputs HTML).
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  4. #3
  5. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,908
    Rep Power
    6351
    It also needs to be very very complex, and won't work very well. Even google, arguably the greatest software development house in the history of mankind, makes a GPS voice which mispronounces Philadelphia.
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    4
    Rep Power
    0
    Thank you reply. Is there another approach I can take?

    Something like I voice record the word 'apple' then click play. Any suggestion?
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2003
    Posts
    3,501
    Rep Power
    594
    If you mean make your own recordings, yes. If the phrases you want to use are limited then you can create your own clips and send them as au's to the browser.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  10. #6
  11. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,908
    Rep Power
    6351
    What is the actual problem you're trying to solve here?
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Dec 2004
    Posts
    2,998
    Rep Power
    375
    Originally Posted by bettylist
    Thank you reply. Is there another approach I can take?

    Something like I voice record the word 'apple' then click play. Any suggestion?
    you could do that but it will take you forever to do as there are million words in dictionary?
  14. #8
  15. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    4
    Rep Power
    0
    I am simply trying to help some kids helping with english words pronunciation. There are millions of words. I am new to PHP but I enjoy with PHP. Please advise the best approach.

    Thanks.

    -B
  16. #9
  17. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,317
    Rep Power
    7170
    The only practical approach is to manually record all of the words you want to use.

    Theoretically it is possible to write code in PHP that will generate an audio file of an arbitrary word; but you would need a team of programmers and audio engineers, millions of dollars and years of time in order to actually do it well.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  18. #10
  19. No Profile Picture
    Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Dec 2004
    Posts
    2,998
    Rep Power
    375
    Originally Posted by bettylist
    I am simply trying to help some kids helping with english words pronunciation. There are millions of words. I am new to PHP but I enjoy with PHP. Please advise the best approach.

    Thanks.

    -B
    if that is the case, create a flash based game (or even php based but flash will entice the kids more) then have words and when clicked play a sound. easy to do in flash and php..

    for php generate the words and then sound next to it so if the word is "deaf" save the sound in a folder called .../sounds/deaf.mpeg (or a suitable alternative)..
  20. #11
  21. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,908
    Rep Power
    6351
    You cannot generate proper pronunciation with a computer. Like I said earlier, even google mispronounces Philadelphia. You have to have a human being (with good diction) record the entire dictionary.
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.
  22. #12
  23. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    4
    Rep Power
    0
    Thank you for the info.

IMN logo majestic logo threadwatch logo seochat tools logo