Skip to content

Instantly share code, notes, and snippets.

@cecilemuller
Created January 6, 2012 15:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cecilemuller/1571147 to your computer and use it in GitHub Desktop.
Save cecilemuller/1571147 to your computer and use it in GitHub Desktop.
Better text-to-speech using Google Translate in VRML/X3D
#VRML V2.0 utf8
Sound {
location 0 0 10
spatialize FALSE
source DEF mp3 AudioClip {
loop FALSE
## Français
url "http://translate.google.com/translate_tts?tl=fr&q=bonjour"
## English
#url "http://translate.google.com/translate_tts?tl=en&q=hello"
## Deutsch
#url "http://translate.google.com/translate_tts?tl=de&q=hallo"
}
}
Viewpoint {
position 0 0 10
}
Group {
children [
DEF sensor TouchSensor {}
Shape {
appearance Appearance {
material Material {
diffuseColor 0 0 0
emissiveColor 0 1 0
}
}
geometry Sphere{}
}
]
ROUTE sensor.touchTime TO mp3.startTime
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment