Skip to content

SpeechSynthesizer pitch does not affect the speech #3015

@mattleibow

Description

@mattleibow

Describe the bug

I am using the speech synth to speak this xml:

<speak version='1.0' xmlns='http://www.w3.org/2001/10/synthesis' xml:lang='en-US'>
   <prosody pitch='x-high' rate='default' volume='100'>Xamarin Essentials makes text to speech easy!</prosody> 
</speak>

Even though I have the pitch set to x-high, the pitch actually remains the same as default. Same with x-low.

Steps to reproduce the bug

var ssml = @"<speak version='1.0' xmlns='http://www.w3.org/2001/10/synthesis' xml:lang='en-US'>
   <prosody pitch='x-high' rate='default' volume='100'>Xamarin Essentials makes text to speech easy!</prosody> 
</speak>";

var player = new MediaPlayer();
var speechSynthesizer = new SpeechSynthesizer();
var stream = await speechSynthesizer.SynthesizeSsmlToStreamAsync(ssml);
player.Source = MediaSource.CreateFromStream(stream, stream.ContentType);
player.Play();

Expected behavior

Pitch changes

Screenshots

No response

NuGet package version

1.1.4

Packaging type

Packaged (MSIX)

Windows version

Windows 11 version 21H2 (22000)

IDE

Visual Studio 2022

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions