SpeechSynthesize

SpeechSynthesize[expr]

synthesizes the contents of expr as an Audio object.

SpeechSynthesize[expr,voice]

uses the specified voice to synthesize the speech signal.

Details and Options

  • Speech synthesis is also known as text to speech and attempts to produce naturally worded speech rather than literal representations of expression structure.
  • SpeechSynthesize["string"] synthesizes the text in "string".
  • SpeechSynthesize[expr] works with mathematical expressions, graphics and other constructs.
  • SpokenString[expr] gives the text of the speech generated by SpeechSynthesize[expr].
  • SpeechSynthesize[expr] synthesizes using a default voice. $VoiceStyles lists all available voices.
  • SpeechSynthesize accepts all SpokenString options with the following additions:
  • Language"English"the language to use for synthesis
    MethodAutomaticmethod settings to use
    OverwriteTargetFalsewhether to overwrite an existing file
  • By default, the synthesized speech is placed under the "Audio" directory in $WolframDocumentsDirectory.
  • Use Method->{"StorageLocation"->loc} to specify the location of the generated signal. Possible settings for loc include:
  • Automatican audio object linking to a file with automatically generated name
    filean audio object linking to file
    "Memory"an in-memory audio object
  • Using Language->Automatic, the language of "string" is identified using LanguageIdentify.
  • SpeechSynthesize uses machine learning. Its methods, training sets and biases included therein may change and yield varied results in different versions of the Wolfram Language.

Examples

open allclose all

Basic Examples  (2)

Speech synthesis of a piece of text:

Speech-synthesized spoken form of an expression:

Scope  (5)

Speech synthesis using a specific voice:

Use $VoiceStyles to get the list of available voices:

Synthesize using a female voice:

Synthesize using an Italian voice:

Synthesize using a voice specified by an Association:

Options  (3)

Language  (1)

Synthesize an Italian sentence:

Synthesize an English sentence using an Italian accent:

Translate an English text to Italian before synthesizing:

Method  (1)

Use the Method option to control the storage location for the result:

If "Memory" is specified, an in-core Audio object is created:

OverwriteTarget  (1)

By default, a file won't be overwritten if it already exists:

Overwrite the target file:

Properties & Relations  (1)

Use Speak to immediately start speaking an expression:

Use AudioPlay to play the synthesized audio:

Introduced in 2017
 (11.2)
 |
Updated in 2018
 (11.3)
2019
 (12.0)
2020
 (12.1)