Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
Speech.Speak
Speaks text.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| Speech | 6.3 | Yes | Yes | No | No | Yes |
(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. |
"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 | Available in MBS FileMaker Plugin 7.2 or newer. The volume to use. Default is full volume. Range from 0.0 (silent) to 1.0 (full). |
1.0 | Optional |
| Rate | Available in MBS FileMaker Plugin 7.2 or newer. 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 |
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 Text.IsSpeaking 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 > 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:
# literal speaking
MBS( "Speech.Speak"; "Hello [[char LTRL]] cat [[char NORM]] cat."; ""; 1)
# use emphasis:
MBS( "Speech.Speak"; "Do [[emph +]] not [[emph -]] over tighten the screw.")
# see
# https://developer.apple.com/library/content/documentation/UserExperience/Conceptual/SpeechSynthesisProgrammingGuide/FineTuning/FineTuning.html
See also
Example Databases
Blog Entries
Release notes
- Version 8.3
- Fixed Text.Speak to properly stop on Windows if called with no text.
- Renamed Text.Speak functions to Speech functions.
Created 30th May 2016, last changed 13th July 2018
Speech.Resume - SpeechRecognition.AuthorizationStatus
Feedback: Report problem or ask question.
Links
MBS Xojo tutorial videos