ObjectExtensionsSpeak(Object, InstalledVoice, Int32, Int32) Method

Speaks the string representation of the source object by using the operating system integrated text-to-speech synthesizer.

Definition

Namespace: DevCase.Extensions.ObjectExtensions
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[EditorBrowsableAttribute(EditorBrowsableState.Always)]
public static void Speak(
	this Object obj,
	InstalledVoice voice = null,
	int rate = 0,
	int volume = 100
)

Parameters

obj  Object
The object to be spoken.
voice  InstalledVoice  (Optional)
Optional. Selects the voice to use, such as "Microsoft Zira Desktop" or "Microsoft Helena Desktop".

Note: If this value is null, the default voice is the one for the current culture specified in the CurrentCulture property.

rate  Int32  (Optional)
Optional. Sets the speaking rate of the selected voice.

Allowed values are in the range of -10 (slowest) to +10 (fastest).

Default value: 0 (normal rate).

volume  Int32  (Optional)
Optional. Sets the output volume of the synthesizer.

Allowed values are in the range of 0 (minimum) to 100 (maximum).

Default value: 100 (maximum volume)

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Object. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

See Also