Skip to content

Speak method appears to be broken in 7 and 7.1.0-preview1 #12236

@1024-Kibibytes

Description

@1024-Kibibytes

The following code works in PowerShell 5.1, but throws an error on 7.0 and 7.1.0-preview1

Add-Type -AssemblyName System.speech

$speak = New-Object System.Speech.Synthesis.SpeechSynthesizer
PS C:\Users\User> $speak.Speak("This is Windows talking.")

On PowerShell 5.1, the expected result happens, i. e. the system speaks the text. On 7.0 and apparently later, it throws the following error:
MethodInvocationException: Exception calling "Speak" with "1" argument(s): "Object reference not set to an instance of an object."

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-No ActivityIssue has had no activity for 6 months or moreWG-Enginecore PowerShell engine, interpreter, and runtimeWaiting - DotNetCorewaiting on a fix/change in .NET

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions