ObjectExtensionsSpeak(Object, String, Int32, Int32) Method
Speaks the string representation of the source object by using the
operating system integrated text-to-speech synthesizer.
Namespace: DevCase.Extensions.ObjectExtensionsAssembly: 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,
string voiceName = "",
int rate = 0,
int volume = 100
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Sub Speak (
obj As Object,
Optional voiceName As String = "",
Optional rate As Integer = 0,
Optional volume As Integer = 100
)
Dim obj As Object
Dim voiceName As String
Dim rate As Integer
Dim volume As Integer
obj.Speak(voiceName, rate, volume)
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
static void Speak(
Object^ obj,
String^ voiceName = L"",
int rate = 0,
int volume = 100
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member Speak :
obj : Object *
?voiceName : string *
?rate : int *
?volume : int
(* Defaults:
let _voiceName = defaultArg voiceName ""
let _rate = defaultArg rate 0
let _volume = defaultArg volume 100
*)
-> unit
No code example is currently available or this language may not be supported.
- obj Object
-
The object to be spoken.
- voiceName String (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)
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).
This is a code example.
No code example is currently available or this language may not be supported.
Dim c As Color = Color.LightGoldenrodYellow
c.Speak(name:="Microsoft Zira Desktop", rate:=1, volume:=100)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.