此为 Mathematica 7 文档,内容基于更早版本的 Wolfram 语言
查看最新文档(版本11.1)
Mathematica HowTo
How to | Make Mathematica Speak
Starting in version 7, Mathematica includes expression-to-speech functionality. In principle, any Mathematica expression can be translated in this way.
Apply the function Speak to make Mathematica speak:
In[1]:=
Click for copyable input
Out[1]=
You can also make Mathematica speak by right-clicking a highlighted expression and choosing Speak Selection from the contextual menu.
If, instead, you would like to see a text version of the input, apply SpokenString:
In[2]:=
Click for copyable input
Out[2]=
    
Using SpokenString gives you the output:
In[3]:=
Click for copyable input
Out[3]=
Using HoldForm gives you the input:
In[4]:=
Click for copyable input
Out[4]=
The same holds for Speak:
In[5]:=
Click for copyable input
Out[5]=
Out[5]=
    
SpokenString with HoldForm can be used on graphics as well:
In[6]:=
Click for copyable input
Out[6]=
In[7]:=
Click for copyable input
Out[7]=
Naturally, Speak still works in this case:
In[8]:=
Click for copyable input
Out[8]=