({{, (RefLink[SpokenString, paclet:ref/SpokenString])[expr] 
gives a string of text corresponding to a spoken representation of the expression expr.}})

OpenersNotesSection(Spacer1)Details and Options

(RefLink[SpokenString, paclet:ref/SpokenString])[expr] works with mathematical expressions, programs, graphics, and other constructs.

(RefLink[SpokenString, paclet:ref/SpokenString])[(RefLink[HoldForm, paclet:ref/HoldForm])[expr]] gives a representation of the held form of expr, without evaluation.

(RefLink[SpokenString, paclet:ref/SpokenString]) attempts to give naturally worded speech rather than literal representations of expression structure.

The following options can be given:

"ArraySizeLimit" and "ExpressionDepthLimit" control the size of all output expressions, including the representation of graphics.

The options controlling the size specify the level of complexity at which to begin eliding parts of the output rather than the exact count of elements in the output.

(RefLink[SpokenString, paclet:ref/SpokenString])["str"] always returns "str". (RefLink[SpokenString, paclet:ref/SpokenString])[(RefLink[HoldForm, paclet:ref/HoldForm])["str"]] returns a processed version of the string, affected by the options.

(RefLink[SpokenString, paclet:ref/SpokenString])[(RefLink[Unevaluated, paclet:ref/Unevaluated])[expr]] also gives a representation of the held form of expr.

OpenersPrimaryExamplesSection(Spacer1)Examples  (16)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

Give a spoken representation of a formula:

SpokenString[a+b^2]

Give a spoken description of a graphic:

SpokenString[Graphics[{Red,Disk[]}]]

OpenersExampleSection1(Spacer1)Scope  (4)

Describe mathematical expressions and functions:

SpokenString[Sqrt[x/(y+z)]]

SpokenString[Sin[x]+O[x]^4]

SpokenString[D[f[x,y],x,y]]

SpokenString[HoldForm[Solve[{x+y==1,x-2y==2}]]]

Describe programming constructs:

SpokenString[x_/;x>0]

SpokenString[HoldForm[i=0;While[RandomReal[]<.5,Print[++i]]]]

Describe a plot:

SpokenString[HoldForm[Plot[x,{x,0,1}]]]

Describe a graphics object:

SpokenString[Graphics3D[Cylinder[]]]

OpenersExampleSection2(Spacer1)Options  (8)

OpenersExampleSubsection0(Spacer1)"ArraySizeLimit"  (1)

Limit the number of arguments included in the text:

SpokenString[HoldForm[1 2 3 4 5 6 7 8 9 10],"ArraySizeLimit"->4]

OpenersExampleSubsection1(Spacer1)"DetailedGraphics"  (1)

Include a detailed description of graphics primitives:

SpokenString[Graphics3D[Sphere[{{0,0,0},{1,1,1}}]],"DetailedGraphics"->True]

OpenersExampleSubsection2(Spacer1)"ExpressionDepthLimit"  (1)

Limit the depth of subexpressions included in the text:

SpokenString[{{{x}}},"ExpressionDepthLimit"->2]

OpenersExampleSubsection3(Spacer1)"IncludeParentheses"  (1)

Use simplified delimiting of subexpressions:

SpokenString[Sqrt[x/(y+z)]]

Include left and right parentheses in the text:

SpokenString[Sqrt[x/(y+z)],"IncludeParentheses"->True]

OpenersExampleSubsection4(Spacer1)"IntegerLimit"  (1)

Set a threshold for exact integers and rationals:

SpokenString[123457/234567,"IntegerLimit"->1000]

OpenersExampleSubsection5(Spacer1)"PostProcess"  (1)

Show the text with the markup used by the speech engine:

SpokenString[{1,2,3},"PostProcess"->False]

OpenersExampleSubsection6(Spacer1)"RealPrecisionLimit"  (1)

Set a threshold for number of digits in reals:

SpokenString[N[Pi],"RealPrecisionLimit"->6]

OpenersExampleSubsection7(Spacer1)"StringLengthLimit"  (1)

Limit the length of strings in the text:

SpokenString[HoldForm["string one string two string three"],"StringLengthLimit"->6]

OpenersExampleSection3(Spacer1)Properties & Relations  (1)

Use (RefLink[Speak, paclet:ref/Speak]) to hear the string produced by (RefLink[SpokenString, paclet:ref/SpokenString]):

SpokenString[a+b^2]

Speak[a+b^2]

OpenersExampleSection4(Spacer1)Neat Examples  (1)

Describe a mathematical expression:

SpokenString[HoldForm[Integrate[Sin[x],x]]]

Use the result as a Wolfram|Alpha query:

WolframAlpha[%]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Speak, paclet:ref/Speak])  ▪  (RefLink[SpeechSynthesize, paclet:ref/SpeechSynthesize])  ▪  (RefLink[TraditionalForm, paclet:ref/TraditionalForm])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Mathematical Typesetting, paclet:guide/MathematicalTypesetting])}, {▪(RefLinkPlain[Sound and Sonification, paclet:guide/SoundAndSonification])}, {▪(RefLinkPlain[Text Generation, paclet:guide/TextConstruction])}, {▪(RefLinkPlain[Converting between Expressions & Strings, paclet:guide/ConvertingBetweenExpressionsAndStrings])}, {▪(RefLinkPlain[Accessibility, paclet:guide/Accessibility])}})}})