Skip to content

Commit

Permalink
switch default voice, Andrew -> AndrewMultilingual, notes Ava-> AvaMu…
Browse files Browse the repository at this point in the history
…ltilingual (#2307)

Co-authored-by: Huaiping Ming <[email protected]>
  • Loading branch information
minghuaiping and HuaipingMing authored Mar 19, 2024
1 parent b9dcd4d commit f57dcd2
Show file tree
Hide file tree
Showing 24 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion quickstart/cpp/linux/text-to-speech/helloworld.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ void synthesizeSpeech()
auto config = SpeechConfig::FromSubscription("YourSubscriptionKey", "YourServiceRegion");

// Set the voice name, refer to https://aka.ms/speech/voices/neural for full list.
config->SetSpeechSynthesisVoiceName("en-US-AvaNeural");
config->SetSpeechSynthesisVoiceName("en-US-AvaMultilingualNeural");

// Creates a speech synthesizer using the default speaker as audio output. The default spoken language is "en-us".
auto synthesizer = SpeechSynthesizer::FromConfig(config);
Expand Down
2 changes: 1 addition & 1 deletion quickstart/cpp/macos/text-to-speech/helloworld.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ void synthesizeSpeech()
auto config = SpeechConfig::FromSubscription("YourSubscriptionKey", "YourServiceRegion");

// Set the voice name, refer to https://aka.ms/speech/voices/neural for full list.
config->SetSpeechSynthesisVoiceName("en-US-AvaNeural");
config->SetSpeechSynthesisVoiceName("en-US-AvaMultilingualNeural");

// Creates a speech synthesizer using the default speaker as audio output. The default spoken language is "en-us".
auto synthesizer = SpeechSynthesizer::FromConfig(config);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ void synthesizeSpeech()
auto config = SpeechConfig::FromSubscription("YourSubscriptionKey", "YourServiceRegion");

// Set the voice name, refer to https://aka.ms/speech/voices/neural for full list.
config->SetSpeechSynthesisVoiceName("en-US-AvaNeural");
config->SetSpeechSynthesisVoiceName("en-US-AvaMultilingualNeural");

// Creates a speech synthesizer using the default speaker as audio output. The default spoken language is "en-us".
auto synthesizer = SpeechSynthesizer::FromConfig(config);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static async Task SynthesisToSpeakerAsync()
var config = SpeechConfig.FromSubscription("YourSubscriptionKey", "YourServiceRegion");

// Set the voice name, refer to https://aka.ms/speech/voices/neural for full list.
config.SpeechSynthesisVoiceName = "en-US-AvaNeural";
config.SpeechSynthesisVoiceName = "en-US-AvaMultilingualNeural";

// Creates a speech synthesizer using the default speaker as audio output.
using (var synthesizer = new SpeechSynthesizer(config))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static async Task SynthesisToSpeakerAsync()
var config = SpeechConfig.FromSubscription("YourSubscriptionKey", "YourServiceRegion");

// Set the voice name, refer to https://aka.ms/speech/voices/neural for full list.
config.SpeechSynthesisVoiceName = "en-US-AvaNeural";
config.SpeechSynthesisVoiceName = "en-US-AvaMultilingualNeural";


// Creates a speech synthesizer using the default speaker as audio output.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public static void main(String[] args) {
try (SpeechConfig config = SpeechConfig.fromSubscription(speechSubscriptionKey, serviceRegion)) {
// Set the voice name, refer to https://aka.ms/speech/voices/neural for full
// list.
config.setSpeechSynthesisVoiceName("en-US-AvaNeural");
config.setSpeechSynthesisVoiceName("en-US-AvaMultilingualNeural");
try (SpeechSynthesizer synth = new SpeechSynthesizer(config)) {

assert (config != null);
Expand Down
2 changes: 1 addition & 1 deletion quickstart/python/text-to-speech/quickstart.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
speech_config = speechsdk.SpeechConfig(subscription=speech_key, region=service_region)

# Set the voice name, refer to https://aka.ms/speech/voices/neural for full list.
speech_config.speech_synthesis_voice_name = "en-US-AvaNeural"
speech_config.speech_synthesis_voice_name = "en-US-AvaMultilingualNeural"

# Creates a speech synthesizer using the default speaker as audio output.
speech_synthesizer = speechsdk.SpeechSynthesizer(speech_config=speech_config)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

// Create a new synthesis task with plain text
var newSynthesisUri = await synthesisClient.CreateSynthesisAsync(
"en-US-AvaNeural",
"en-US-AvaMultilingualNeural",
"sample batch synthesis",
"sample description",
sampleScript,
Expand Down
2 changes: 1 addition & 1 deletion samples/batch-synthesis/python/synthesis.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def submit_synthesis():
'description': DESCRIPTION,
"textType": "PlainText",
'synthesisConfig': {
"voice": "en-US-AvaNeural",
"voice": "en-US-AvaMultilingualNeural",
},
# Replace with your custom voice name and deployment ID if you want to use custom voice.
# Multiple voices are supported, the mixture of custom voices and platform voices is allowed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ void SpeechSynthesisWithVoice()
auto config = SpeechConfig::FromSubscription("YourSubscriptionKey", "YourServiceRegion");

// Sets the voice name.
// e.g. "en-US-AndrewNeural".
// e.g. "en-US-AndrewMultilingualNeural".
// The full list of supported voices can be found here:
// https://aka.ms/csspeech/voicenames
// And, you can try GetVoicesAsync method to get all available voices (see SpeechSynthesisGetAvailableVoices() sample below).
auto voice = "en-US-AndrewNeural";
auto voice = "en-US-AndrewMultilingualNeural";
config->SetSpeechSynthesisVoiceName(voice);

// Creates a speech synthesizer for the specified voice, using the default speaker as audio output.
Expand Down Expand Up @@ -803,7 +803,7 @@ void SpeechSynthesisBookmarkEvent()
};

// Bookmark tag is needed in the SSML, e.g.
const auto ssml = "<speak version='1.0' xml:lang='en-US' xmlns='http://www.w3.org/2001/10/synthesis' xmlns:mstts='http://www.w3.org/2001/mstts'><voice name='en-US-AvaNeural'><bookmark mark='bookmark_one'/> one. <bookmark mark='bookmark_two'/> two. three. four.</voice></speak>";
const auto ssml = "<speak version='1.0' xml:lang='en-US' xmlns='http://www.w3.org/2001/10/synthesis' xmlns:mstts='http://www.w3.org/2001/mstts'><voice name='en-US-AvaMultilingualNeural'><bookmark mark='bookmark_one'/> one. <bookmark mark='bookmark_two'/> two. three. four.</voice></speak>";

cout << "Press Enter to start synthesizing." << std::endl;
std::string text;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ public static async Task SynthesisWithVoiceAsync()
var config = SpeechConfig.FromSubscription("YourSubscriptionKey", "YourServiceRegion");

// Sets the voice name.
// e.g. "en-US-AndrewNeural".
// e.g. "en-US-AndrewMultilingualNeural".
// The full list of supported voices can be found here:
// https://aka.ms/csspeech/voicenames
// And, you can try GetVoicesAsync method to get all available voices (see SynthesisGetAvailableVoicesAsync() sample below).
var voice = "en-US-AndrewNeural";
var voice = "en-US-AndrewMultilingualNeural";
config.SpeechSynthesisVoiceName = voice;

// Creates a speech synthesizer for the specified voice, using the default speaker as audio output.
Expand Down Expand Up @@ -803,7 +803,7 @@ public static async Task SynthesisBookmarkEventAsync()
Console.ReadLine();

// Bookmark tag is needed in the SSML, e.g.
var ssml = "<speak version='1.0' xml:lang='en-US' xmlns='http://www.w3.org/2001/10/synthesis' xmlns:mstts='http://www.w3.org/2001/mstts'><voice name='en-US-AvaNeural'><bookmark mark='bookmark_one'/> one. <bookmark mark='bookmark_two'/> two. three. four.</voice></speak>";
var ssml = "<speak version='1.0' xml:lang='en-US' xmlns='http://www.w3.org/2001/10/synthesis' xmlns:mstts='http://www.w3.org/2001/mstts'><voice name='en-US-AvaMultilingualNeural'><bookmark mark='bookmark_one'/> one. <bookmark mark='bookmark_two'/> two. three. four.</voice></speak>";

using (var result = await synthesizer.SpeakSsmlAsync(ssml))
{
Expand Down Expand Up @@ -971,7 +971,7 @@ public static async Task SynthesizeOnceUseCustomVoiceToSpeakerAsyncSwitchPlatfor
|| details.ErrorCode == CancellationErrorCode.ServiceTimeout
|| details.ErrorDetails.Contains("Error code: 1007"))
{
// Synthesize using a standard platform voice, e.g. en-US-AvaNeural
// Synthesize using a standard platform voice, e.g. en-US-AvaMultilingualNeural
synthesisResult = await SynthesizeOnceAsyncInternal("YourSubscriptionKey", "YourServiceRegion", null, "YourPlatformVoiceName");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ public class SpeechSynthesisServerScenarioSample
public static void SpeechSynthesizeWithPool()
{
SynthesisServer server = new SynthesisServer(subscriptionKey, region,
"en-US-AvaNeural", SpeechSynthesisOutputFormat.Audio24Khz48KBitRateMonoMp3, concurrency);
"en-US-AvaMultilingualNeural", SpeechSynthesisOutputFormat.Audio24Khz48KBitRateMonoMp3, concurrency);

for (var turn = 0; turn < 3; turn++)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public void onCreateSynthesizerButtonClicked(View v) {
// Use 24k Hz format for higher quality.
speechConfig.setSpeechSynthesisOutputFormat(SpeechSynthesisOutputFormat.Raw24Khz16BitMonoPcm);
// Set voice name.
speechConfig.setSpeechSynthesisVoiceName("en-US-AvaNeural");
speechConfig.setSpeechSynthesisVoiceName("en-US-AvaMultilingualNeural");
synthesizer = new SpeechSynthesizer(speechConfig, null);
connection = Connection.fromSpeechSynthesizer(synthesizer);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ public static void synthesisWithVoiceAsync() throws InterruptedException, Execut
SpeechConfig config = SpeechConfig.fromSubscription("YourSubscriptionKey", "YourServiceRegion");

// Sets the voice name.
// e.g. "en-US-AndrewNeural".
// e.g. "en-US-AndrewMultilingualNeural".
// The full list of supported voices can be found here:
// https://aka.ms/csspeech/voicenames
// And, you can try getVoicesAsync method to get all available voices (see synthesisGetAvailableVoicesAsync() sample below).
String voice = "en-US-AndrewNeural";
String voice = "en-US-AndrewMultilingualNeural";
config.setSpeechSynthesisVoiceName(voice);

// Creates a speech synthesizer using the default speaker as audio output.
Expand Down Expand Up @@ -864,7 +864,7 @@ public static void synthesisBookmarkEventAsync() throws InterruptedException, Ex
new Scanner(System.in).nextLine();

// Bookmark tag is needed in the SSML, e.g.
String ssml = "<speak version='1.0' xml:lang='en-US' xmlns='http://www.w3.org/2001/10/synthesis' xmlns:mstts='http://www.w3.org/2001/mstts'><voice name='en-US-AvaNeural'><bookmark mark='bookmark_one'/> one. <bookmark mark='bookmark_two'/> two. three. four.</voice></speak>";
String ssml = "<speak version='1.0' xml:lang='en-US' xmlns='http://www.w3.org/2001/10/synthesis' xmlns:mstts='http://www.w3.org/2001/mstts'><voice name='en-US-AvaMultilingualNeural'><bookmark mark='bookmark_one'/> one. <bookmark mark='bookmark_two'/> two. three. four.</voice></speak>";

SpeechSynthesisResult result = synthesizer.SpeakSsmlAsync(ssml).get();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public SpeechSynthesisService() {
/**
* A thread-safe method to synthesize content
* @param content The text to synthesize
* @param voice The voice name, e.g. en-US-AvaNeural
* @param voice The voice name, e.g. en-US-AvaMultilingualNeural
* @return The first byte latency and processing time, in millisecond.
*/
public long[] synthesis(String content, String voice) {
Expand Down Expand Up @@ -149,7 +149,7 @@ public static void synthesisServerScenarioAsync() throws InterruptedException {
System.out.printf("Turn: %d%n", finalTurn);

IntStream.range(0, 64).parallel().forEach(i -> {
long[] latency = service.synthesis(String.format("today is a nice day. %d%d", finalTurn, i), "en-US-AvaNeural");
long[] latency = service.synthesis(String.format("today is a nice day. %d%d", finalTurn, i), "en-US-AvaMultilingualNeural");
if (finalTurn > 0) {
latencies.add(latency[0]);
processingTimes.add(latency[1]);
Expand Down
2 changes: 1 addition & 1 deletion samples/js/browser/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ <h3 style="font-weight:500;">Javascript Browser Sample</h3>
<option value="en-CA-ClaraNeural">English - CA</option>
<option value="en-GB-NoahNeural">English - GB</option>
<option value="en-IN-NeerjaNeural">English - IN</option>
<option value="en-US-AvaNeural">English - US</option>
<option value="en-US-AvaMultilingualNeural">English - US</option>
<option value="es-ES-ElviraNeural">Spanish - ES</option>
<option value="es-MX-LibertoNeural">Spanish - MX</option>
<option value="fi-FI-HarriNeural">Finnish - FI</option>
Expand Down
2 changes: 1 addition & 1 deletion samples/js/browser/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ <h3 style="font-weight:500;">Javascript Browser Sample</h3>
<option value="en-CA-ClaraNeural">English - CA</option>
<option value="en-GB-NoahNeural">English - GB</option>
<option value="en-IN-NeerjaNeural">English - IN</option>
<option value="en-US-AvaNeural">English - US</option>
<option value="en-US-AvaMultilingualNeural">English - US</option>
<option value="es-ES-ElviraNeural">Spanish - ES</option>
<option value="es-MX-LibertoNeural">Spanish - MX</option>
<option value="fi-FI-HarriNeural">Finnish - FI</option>
Expand Down
2 changes: 1 addition & 1 deletion samples/js/browser/public/synthesis.html
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ <h1 style="font-weight:500;">Speech Speech SDK not found
request.onload = function() {
if (request.status >= 200 && request.status < 400) {
const response = this.response;
const defaultVoice = "AndrewNeural";
const defaultVoice = "AndrewMultilingualNeural";
let selectId;
const data = JSON.parse(response);
voiceOptions.innerHTML = "";
Expand Down
2 changes: 1 addition & 1 deletion samples/js/browser/synthesis.html
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ <h1 style="font-weight:500;">Speech Speech SDK not found
request.onload = function() {
if (request.status >= 200 && request.status < 400) {
const response = this.response;
const defaultVoice = "AndrewNeural";
const defaultVoice = "AndrewMultilingualNeural";
let selectId;
const data = JSON.parse(response);
voiceOptions.innerHTML = "";
Expand Down
2 changes: 1 addition & 1 deletion samples/js/node/synthesis.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const main = (settings, filename) => {
// setting the synthesis language, voice name, and output audio format.
// see https://aka.ms/speech/tts-languages for available languages and voices
speechConfig.speechSynthesisLanguage = settings.language;
speechConfig.speechSynthesisVoiceName = "en-US-AvaNeural";
speechConfig.speechSynthesisVoiceName = "en-US-AvaMultilingualNeural";
speechConfig.speechSynthesisOutputFormat = sdk.SpeechSynthesisOutputFormat.Audio16Khz32KBitRateMonoMp3;

var rl = readline.createInterface({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class MainActivity : AppCompatActivity() {
// Use 24k Hz format for higher quality.
speechConfig?.setSpeechSynthesisOutputFormat(SpeechSynthesisOutputFormat.Raw24Khz16BitMonoPcm)
// Set voice name.
speechConfig?.speechSynthesisVoiceName = "en-US-AvaNeural"
speechConfig?.speechSynthesisVoiceName = "en-US-AvaMultilingualNeural"
synthesizer = SpeechSynthesizer(speechConfig, null)
connection = Connection.fromSpeechSynthesizer(synthesizer)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ - (void)synthesisEvent {
}];

// To trigger a bookmark event, bookmark tags are required in the SSML, e.g.
// "<speak version='1.0' xml:lang='en-US' xmlns='http://www.w3.org/2001/10/synthesis' xmlns:mstts='http://www.w3.org/2001/mstts'><voice name='en-US-AvaNeural'><bookmark mark='bookmark_one'/> one. <bookmark mark='bookmark_two'/> two. three. four.</voice></speak>"
// "<speak version='1.0' xml:lang='en-US' xmlns='http://www.w3.org/2001/10/synthesis' xmlns:mstts='http://www.w3.org/2001/mstts'><voice name='en-US-AvaMultilingualNeural'><bookmark mark='bookmark_one'/> one. <bookmark mark='bookmark_two'/> two. three. four.</voice></speak>"
[synthesizerForEvents addBookmarkReachedEventHandler: ^ (SPXSpeechSynthesizer *synthesizer, SPXSpeechSynthesisBookmarkEventArgs *eventArgs) {
// The unit of AudioOffset is tick (1 tick = 100 nanoseconds), divide by 10,000 to converted to milliseconds.
NSLog(@"Bookmark reached. Audio offset: %fms, bookmark text: %@.", eventArgs.audioOffset/10000., eventArgs.text);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

class LongTextSynthesizer:
def __init__(self, subscription: str, region: str, language: str = 'english',
voice: str = 'en-US-AvaNeural', parallel_threads: int = 8) -> None:
voice: str = 'en-US-AvaMultilingualNeural', parallel_threads: int = 8) -> None:
self.is_ssml = None
self.subscription = subscription
self.region = region
Expand Down
6 changes: 3 additions & 3 deletions samples/python/console/speech_synthesis_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ def speech_synthesis_with_voice():
# Creates an instance of a speech config with specified subscription key and service region.
speech_config = speechsdk.SpeechConfig(subscription=speech_key, region=service_region)
# Sets the synthesis voice name.
# e.g. "en-US-AndrewNeural".
# e.g. "en-US-AndrewMultilingualNeural".
# The full list of supported voices can be found here:
# https://aka.ms/csspeech/voicenames
# And, you can try get_voices_async method to get all available voices.
# See speech_synthesis_get_available_voices() sample below.
voice = "en-US-AndrewNeural"
voice = "en-US-AndrewMultilingualNeural"
speech_config.speech_synthesis_voice_name = voice
# Creates a speech synthesizer for the specified voice,
# using the default speaker as audio output.
Expand Down Expand Up @@ -522,7 +522,7 @@ def speech_synthesis_bookmark_event():
# Bookmark tag is needed in the SSML, e.g.
ssml = "<speak version='1.0' xml:lang='en-US' xmlns='http://www.w3.org/2001/10/synthesis' " \
"xmlns:mstts='http://www.w3.org/2001/mstts'>" \
"<voice name='en-US-AvaNeural'>" \
"<voice name='en-US-AvaMultilingualNeural'>" \
"<bookmark mark='bookmark_one'/> one. " \
"<bookmark mark='bookmark_two'/> two. three. four.</voice></speak> "

Expand Down

0 comments on commit f57dcd2

Please sign in to comment.