Speech.Speak
------------

Speaks text.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Speech](component_Speech.md) | [6.3](newinversion63.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ✅ Yes |

MBS( "Speech.Speak"; Text { ; Voice; Wait; Volume; Rate } ) 

**MBS**( **"Speech.Speak";** /\* Speaks text. \*/  
**$Text**; /\* The text to speake.g. "Hello World" \*/   
**$Voice**; /\* Optional; The voice to use.  
Can be empty to use default voice.  
On macOS and iOS, this is identifier, not name.e.g. "Agnes" \*/   
**$Wait**; /\* Optional; Whether to wait for completion.  
Pass 1 to wait or 0 to speak while your script continues.  
Default is 0.e.g. 1 \*/   
**$Volume**; /\* Optional; The volume to use.  
Default is full volume.  
Range from 0.0 (silent) to 1.0 (full).e.g. 1.0 \*/   
**$Rate**) /\* Optional; The speak rate.  
Default 1.0 for normal speed.  
Range from 0.0 to 2.0.  
2.0 would be double speed while 0.5 is half speed.  
If the voice doesn’t support rate, you hear no difference!e.g. 1.0 \*/ 

(old name: Text.Speak)

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| Text | The text to speak | "Hello World" |  |
| Voice | The voice to use.   Can be empty to use default voice.   On macOS and iOS, this is identifier, not name. | "Agnes" | Optional |
| Wait | Whether to wait for completion.   Pass 1 to wait or 0 to speak while your script continues.   Default is 0. | 1 | Optional |
| Volume | The volume to use.   Default is full volume.   Range from 0.0 (silent) to 1.0 (full). | 1.0 | Optional      Added in version **7.2**. |
| Rate | The speak rate.   Default 1.0 for normal speed.   Range from 0.0 to 2.0.   2.0 would be double speed while 0.5 is half speed.   If the voice doesn’t support rate, you hear no difference! | 1.0 | Optional      Added in version **7.2**. |

### Result

Returns OK or error.

### Description

Speaks text.  
This is a function doing similar work as the speak script step in FileMaker.  
  
If called with empty text, you can pass voice to test if voice exists. You get back OK if voice exists or an error if not.  
If called without text, you stop existing speech.  
  
Due to a bug in FM 13/14/15, the speak script step may freeze. This function is a suitable workaround until FileMaker fixes the issue.  
  
You can use [Speech.IsSpeaking](SpeechIsSpeaking.md) to check if asynchronously speaking is in use.  
### Examples

Say Hello

 MBS ( "Speech.Speak"; "Hello World")  
Count to 100:

 Set Variable \[$i ; Value:0\]  
Loop  
 Set Variable \[$i ; Value:$i + 1\]  
 Set Field \[Speak Test::Counter ; $i \]  
 Set Variable \[$r ; Value:MBS ( "Speech.Speak"; $i ; ""; 1)\]  
 Commit Records/Requests \[\]  
 Exit Loop If \[$i &gt; 100\]  
End Loop  
Speak with Windows voice:

 MBS ( "Speech.Speak"; "Hello World"; "Microsoft Hedda Desktop - German"; 1)  
Speak with half volume:

 MBS ( "Speech.Speak"; "Hallo Leute"; ""; 0; 0,5 )  
Using embedded text commands on Mac:

 MBS ( "Speech.Speak"; "Hello \[\[char LTRL\]\] cat \[\[char NORM\]\] cat."; ""; 1)  
// literal speaking  
  
MBS ( "Speech.Speak"; "Do \[\[emph +\]\] not \[\[emph -\]\] over tighten the screw.")  
// use emphasis:  
  
// see  
// https://developer.apple.com/library/content/documentation/UserExperience/Conceptual/SpeechSynthesisProgrammingGuide/FineTuning/FineTuning.html  
### See also

- [Speech.Pause](SpeechPause.md)

### Release notes

- **Version 11.0**
    - Fixed rate parameter for [Speech.Speak](https://www.mbsplugins.eu/SpeechSpeak.shtml) function for macOS.
- **Version 8.3**
    - Fixed [Text.Speak](http://www.mbsplugins.eu/SpeechSpeak.shtml) to properly stop on Windows if called with no text.
    - Renamed [Text.Speak](http://www.mbsplugins.eu/SpeechSpeak.shtml) functions to [Speech](http://www.mbsplugins.eu/component_Speech.shtml) functions.

### Example Databases

- [Mac and iOS/MapKit/MapView BeeExample](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/MapKit/MapView%20BeeExample.shtml#13ScriptAnchor_)
- [Utility functions/Speak Test](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Utility%20functions/Speak%20Test.shtml#2ScriptAnchor_)

### Blog Entries

- [MBS Plugin Advent calendar: 4 - Speech](https://www.mbsplugins.de/archive/2023-12-04/MBS_Plugin_Advent_calendar_4_-/monkeybreadsoftware_blog_filemaker)
- [Teach your solution to talk](https://www.mbsplugins.de/archive/2022-10-22/Teach_your_solution_to_talk/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 11.0pr5](https://www.mbsplugins.de/archive/2021-01-02/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 8.3pr6](https://www.mbsplugins.de/archive/2018-07-13/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 8.3pr5](https://www.mbsplugins.de/archive/2018-07-10/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 7.5pr3](https://www.mbsplugins.de/archive/2017-10-23/MBS_FileMaker_Plugin_version_7/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 7.3pr1](https://www.mbsplugins.de/archive/2017-06-05/MBS_FileMaker_Plugin_version_7/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 7.2](https://www.mbsplugins.de/archive/2017-05-15/MBS_FileMaker_Plugin_72/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 7.2pr3](https://www.mbsplugins.de/archive/2017-04-19/MBS_FileMaker_Plugin_version_7/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 6.3 for OS X/Windows](https://www.mbsplugins.de/archive/2016-07-12/MBS_FileMaker_Plugin_63_for_OS/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 6/2021, Seite 24](https://filemaker-magazin.de/neuigkeit/4165-Appetithappen-FMM_202106)

This function checks for a license.

Created 30th May 2016 , last changed 25th February 2026

  
[Speech.Resume](SpeechResume.md) - [Speech.Stop](SpeechStop.md)

[HTML Version](SpeechSpeak.shtml)