Skip to content
This repository has been archived by the owner on Jan 7, 2021. It is now read-only.

Commit

Permalink
Merge pull request #115 from watson-developer-cloud/feat/v3-voices
Browse files Browse the repository at this point in the history
feat(V3 voices): support v3 voices
  • Loading branch information
germanattanasio authored Jun 27, 2019
2 parents 23165b0 + 053f13f commit 3115b36
Show file tree
Hide file tree
Showing 2 changed files with 134 additions and 23 deletions.
2 changes: 1 addition & 1 deletion views/demo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default class Demo extends Component {
constructor(props) {
super(props);
this.state = {
voice: voices[1], // Alisson is the first voice
voice: voices[1], // Allison v3 is the first voice
error: null, // the error from calling /classify
text: voices[1].demo.text, // default text
ssml: voices[1].demo.ssml, // SSML text
Expand Down
155 changes: 133 additions & 22 deletions voices.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,22 @@ const voices = [
ssml: PT_SSML,
},
description: 'Isabela: Brazilian Portuguese (português brasileiro) female voice.',
}, {
name: 'pt-BR_IsabelaV3Voice',
language: 'pt-BR',
option: 'Brazilian Portuguese (pt-BR): IsabelaV3 (female, dnn technology)',
customizable: true,
gender: 'female',
url: 'https://stream.watsonplatform.net/text-to-speech/api/v1/voices/pt-BR_IsabelaV3Voice',
supported_features: {
voice_transformation: false,
custom_pronunciation: true,
},
demo: {
text: PT_TEXT,
ssml: PT_SSML,
},
description: 'Isabela: Brazilian Portuguese (português brasileiro) female voice. Dnn technology.',
}, {
name: 'ja-JP_EmiVoice',
language: 'ja-JP',
Expand Down Expand Up @@ -79,12 +95,12 @@ const voices = [
},
description: 'Michael: American English male voice. Dnn technology.',
}, {
name: 'en-US_MichaelV2Voice',
name: 'en-US_MichaelV3Voice',
language: 'en-US',
option: 'American English (en-US): MichaelV2 (male, dnn technology)',
option: 'American English (en-US): MichaelV3 (male, dnn technology)',
customizable: true,
gender: 'male',
url: 'https://stream.watsonplatform.net/text-to-speech/api/v1/voices/en-US_MichaelV2Voice',
url: 'https://stream.watsonplatform.net/text-to-speech/api/v1/voices/en-US_MichaelV3Voice',
supported_features: {
voice_transformation: false,
custom_pronunciation: true,
Expand Down Expand Up @@ -112,12 +128,12 @@ const voices = [
},
description: 'Allison: American English female voice.',
}, {
name: 'en-US_AllisonV2Voice',
option: 'American English (en-US): AllisonV2 (female, dnn technology)',
name: 'en-US_AllisonV3Voice',
option: 'American English (en-US): AllisonV3 (female, dnn technology)',
language: 'en-US',
customizable: true,
gender: 'female',
url: 'https://stream.watsonplatform.net/text-to-speech/api/v1/voices/en-US_AllisonV2Voice',
url: 'https://stream.watsonplatform.net/text-to-speech/api/v1/voices/en-US_AllisonV3Voice',
supported_features: {
voice_transformation: false,
custom_pronunciation: true,
Expand All @@ -143,6 +159,22 @@ const voices = [
ssml: FR_SSML,
},
description: 'Renee: French (français) female voice.',
}, {
name: 'fr-FR_ReneeV3Voice',
option: 'French (fr-FR): ReneeV3 (female, dnn technology)',
language: 'fr-FR',
customizable: true,
gender: 'female',
url: 'https://stream.watsonplatform.net/text-to-speech/api/v1/voices/fr-FR_ReneeV3Voice',
supported_features: {
voice_transformation: false,
custom_pronunciation: true,
},
demo: {
text: FR_TEXT,
ssml: FR_SSML,
},
description: 'Renee: French (français) female voice. Dnn technology.',
}, {
name: 'it-IT_FrancescaVoice',
language: 'it-IT',
Expand All @@ -160,12 +192,12 @@ const voices = [
},
description: 'Francesca: Italian (italiano) female voice.',
}, {
name: 'it-IT_FrancescaV2Voice',
option: 'Italian (it-IT): FrancescaV2 (female, dnn technology)',
name: 'it-IT_FrancescaV3Voice',
option: 'Italian (it-IT): FrancescaV3 (female, dnn technology)',
language: 'it-IT',
customizable: true,
gender: 'female',
url: 'https://stream.watsonplatform.net/text-to-speech/api/v1/voices/it-IT_FrancescaV2Voice',
url: 'https://stream.watsonplatform.net/text-to-speech/api/v1/voices/it-IT_FrancescaV3Voice',
supported_features: {
voice_transformation: false,
custom_pronunciation: true,
Expand All @@ -191,6 +223,22 @@ const voices = [
ssml: ES_SSML,
},
description: 'Laura: Castilian Spanish (español castellano) female voice.',
}, {
name: 'es-ES_LauraV3Voice',
language: 'es-ES',
option: 'Castilian Spanish (es-ES): LauraV3 (female, dnn technology)',
customizable: true,
gender: 'female',
url: 'https://stream.watsonplatform.net/text-to-speech/api/v1/voices/es-ES_LauraV3Voice',
supported_features: {
voice_transformation: false,
custom_pronunciation: true,
},
demo: {
text: ES_TEXT,
ssml: ES_SSML,
},
description: 'Laura: Castilian Spanish (español castellano) female voice. Dnn technology.',
}, {
name: 'de-DE_BirgitVoice',
language: 'de-DE',
Expand All @@ -208,12 +256,12 @@ const voices = [
},
description: 'Birgit: Standard German of Germany (Standarddeutsch) female voice.',
}, {
name: 'de-DE_BirgitV2Voice',
name: 'de-DE_BirgitV3Voice',
language: 'de-DE',
option: 'German (de-DE): BirgitV2 (female, dnn technology)',
option: 'German (de-DE): BirgitV3 (female, dnn technology)',
customizable: true,
gender: 'female',
url: 'https://stream.watsonplatform.net/text-to-speech/api/v1/voices/de-DE_BirgitV2Voice',
url: 'https://stream.watsonplatform.net/text-to-speech/api/v1/voices/de-DE_BirgitV3Voice',
supported_features: {
voice_transformation: false,
custom_pronunciation: true,
Expand All @@ -239,6 +287,22 @@ const voices = [
ssml: ES_SSML,
},
description: 'Enrique: Castilian Spanish (español castellano) male voice.',
}, {
name: 'es-ES_EnriqueV3Voice',
option: 'Castilian Spanish (es-ES): EnriqueV3 (male, dnn technology)',
language: 'es-ES',
customizable: true,
gender: 'male',
url: 'https://stream.watsonplatform.net/text-to-speech/api/v1/voices/es-ES_EnriqueV3Voice',
supported_features: {
voice_transformation: false,
custom_pronunciation: true,
},
demo: {
text: ES_TEXT,
ssml: ES_SSML,
},
description: 'Enrique: Castilian Spanish (español castellano) male voice. Dnn technology.',
}, {
name: 'de-DE_DieterVoice',
language: 'de-DE',
Expand All @@ -256,12 +320,12 @@ const voices = [
},
description: 'Dieter: Standard German of Germany (Standarddeutsch) male voice.',
}, {
name: 'de-DE_DieterV2Voice',
name: 'de-DE_DieterV3Voice',
language: 'de-DE',
option: 'German (de-DE): DieterV2 (male, dnn technology)',
option: 'German (de-DE): DieterV3 (male, dnn technology)',
customizable: true,
gender: 'male',
url: 'https://stream.watsonplatform.net/text-to-speech/api/v1/voices/de-DE_DieterV2Voice',
url: 'https://stream.watsonplatform.net/text-to-speech/api/v1/voices/de-DE_DieterV3Voice',
supported_features: {
voice_transformation: false,
custom_pronunciation: true,
Expand Down Expand Up @@ -289,12 +353,12 @@ const voices = [
},
description: 'Lisa: American English female voice.',
}, {
name: 'en-US_LisaV2Voice',
option: 'American English (en-US): LisaV2 (female, dnn technology)',
name: 'en-US_LisaV3Voice',
option: 'American English (en-US): LisaV3 (female, dnn technology)',
language: 'en-US',
customizable: true,
gender: 'female',
url: 'https://stream.watsonplatform.net/text-to-speech/api/v1/voices/en-US_LisaV2Voice',
url: 'https://stream.watsonplatform.net/text-to-speech/api/v1/voices/en-US_LisaV3Voice',
supported_features: {
voice_transformation: false,
custom_pronunciation: true,
Expand All @@ -320,6 +384,22 @@ const voices = [
ssml: US_GB_SSML,
},
description: 'Kate: British English female voice.',
}, {
name: 'en-GB_KateV3Voice',
option: 'British English (en-GB): KateV3 (female, dnn technology)',
language: 'en-GB',
customizable: true,
gender: 'female',
url: 'https://stream.watsonplatform.net/text-to-speech/api/v1/voices/en-GB_KateV3Voice',
supported_features: {
voice_transformation: false,
custom_pronunciation: true,
},
demo: {
text: US_TEXT,
ssml: US_GB_SSML,
},
description: 'Kate: British English female voice. Dnn technology.',
}, {
name: 'es-US_SofiaVoice',
language: 'es-US',
Expand All @@ -336,6 +416,22 @@ const voices = [
ssml: ES_SSML,
},
description: 'Sofia: North American Spanish (español norteamericano) female voice.',
}, {
name: 'es-US_SofiaV3Voice',
language: 'es-US',
option: 'North American Spanish (es-US): SofiaV3 (female, dnn technology)',
customizable: true,
gender: 'female',
url: 'https://stream.watsonplatform.net/text-to-speech/api/v1/voices/es-US_SofiaV3Voice',
supported_features: {
voice_transformation: false,
custom_pronunciation: true,
},
demo: {
text: ES_TEXT,
ssml: ES_SSML,
},
description: 'Sofia: North American Spanish (español norteamericano) female voice. Dnn technology.',
}, {
name: 'es-LA_SofiaVoice',
language: 'es-LA',
Expand All @@ -352,10 +448,26 @@ const voices = [
ssml: ES_SSML,
},
description: 'Sofia: Latin American Spanish (español latinoamericano) female voice.',
}, {
name: 'es-LA_SofiaV3Voice',
language: 'es-LA',
option: 'Latin American Spanish (es-LA): SofiaV3 (female, dnn technology)',
customizable: true,
gender: 'female',
url: 'https://stream.watsonplatform.net/text-to-speech/api/v1/voices/es-LA_SofiaV3Voice',
supported_features: {
voice_transformation: false,
custom_pronunciation: true,
},
demo: {
text: ES_TEXT,
ssml: ES_SSML,
},
description: 'Sofia: Latin American Spanish (español latinoamericano) female voice. Dnn technology.',
},
];

const sortedByName = (rhs, lhs) => {
const sortedByOption = (rhs, lhs) => {
let result = -1;
if (rhs.option === lhs.option) {
result = 0;
Expand All @@ -365,6 +477,5 @@ const sortedByName = (rhs, lhs) => {
return result;
};

const sortedVoices = voices.sort(sortedByName);

module.exports = sortedVoices;
const sortedvoices = voices.sort(sortedByOption);
module.exports = sortedvoices;

0 comments on commit 3115b36

Please sign in to comment.