Hi,
I very much like the “Speak” function, which takes a string and speaks it. I think it is cool. However, it would be nice if I can get a handle to its internal workings, for example, its parse structure that drives the spoken form. Is that possible? That would give me a way to manipulate the generated structure before the final sound is emitted.
The parse structure is not available as top level documented functionality. There is a function called SpokenString, which is the textual representation of Speak:
In[1]:= SpokenString[HoldForm[Integrate[1/x^2, x]]]
Out[1]= "the integral of 1 over x squared with respect to x"
Hi Arnoud,
Thanks. The documentation says that. I am looking at the next step. For instance, how does Mathematica proceed to the next step with that string “the integral of 1 over x squared with respect to x”? If the string is directly sent to the machine’s speech engine, then there is nothing to do. Instead if Mathematica does additional processing before sending it to the speech engine, is it possible to access that repn?
If the string is directly sent to the machine’s speech engine, then there is nothing to do.
You could post-process output of SpokenString in anyway you like - for example with Mathematica linguistic functionality. And only then send it to Speak.