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

Commit

Permalink
feat: DNN voices added (English and Italian) (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
leonrch authored and germanattanasio committed Mar 6, 2019
1 parent 7916c3c commit bce78f2
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 2 deletions.
4 changes: 2 additions & 2 deletions views/demo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default class Demo extends Component {
text: voices[3].demo.text, // default text
ssml: voices[3].demo.ssml, // SSML text
ssml_voice: voices[3].demo.ssml_voice, // Voice SSML text, only some voices support this
ssmlLabel: 'Expressive SSML',
ssmlLabel: 'SSML',
current_tab: 0,
loading: false,
};
Expand Down Expand Up @@ -232,7 +232,7 @@ export default class Demo extends Component {
<textarea onChange={this.onSsmlChange} className="base--textarea textarea" spellCheck="false" value={ssml || ''} />
</Pane>
<Pane label="Voice Transformation SSML">
<textarea readOnly={!ssml_voice} onChange={this.onVoiceSsmlChange} className="base--textarea textarea" spellCheck="false" value={ssml_voice || 'Voice Transformation not currently supported for this language.'} />
<textarea readOnly={!ssml_voice} onChange={this.onVoiceSsmlChange} className="base--textarea textarea" spellCheck="false" value={ssml_voice || 'Voice Transformation not currently supported for this voice.'} />
</Pane>
</Tabs>
<div className="output-container">
Expand Down
85 changes: 85 additions & 0 deletions voices.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ const PT_TEXT = 'Consciente do seu patrimônio espiritual e moral, a União é f
const ES_SSML = '<p><s>Consciente de su patrimonio espiritual y moral<break time="300ms"/>, la Unión está fundada sobre los valores indivisibles y universales de la dignidad humana, <prosody rate="-15%"> la libertad, la igualdad y la solidaridad, </prosody> y se basa en los principios de la democracia y el Estado de Derecho<break time="500ms"/>.</s> <s><prosody rate="+20%">Al instituir la ciudadanía de la Unión </prosody> y crear un espacio de libertad, seguridad y justicia, sitúa a la persona en el centro de su actuación.</s></p>';
const FR_SSML = '<p><s>Consciente de son patrimoine spirituel et moral<break time="300ms"/>, l\'Union se fonde sur les valeurs indivisibles et universelles de dignité humaine, <prosody rate="-15%"> de liberté, d\'égalité et de solidarité; </prosody> elle repose sur le principe de la démocratie et le principe de l\'État de droit <break time="500ms"/>. Elle place la personne au coeur de son action en instituant la citoyenneté de l\'Union et en créant un espace de liberté, de sécurité et de justice.</s></p>';
const US_SSML = '<p><s>Conscious of its spiritual and moral heritage <break time="300ms"/>, the Union is founded on the indivisible, universal values of <prosody rate="-15%">human dignity, freedom, equality and solidarity.</prosody> It is based on the principles of democracy and the rule of law <break time="500ms"/>. </s> <s> It places the individual at the heart of its activities, <prosody rate="+15%">by establishing the citizenship of the Union</prosody> and by creating an area of freedom, security and justice.</s></p>';
const US_SSML_DNN = '<p><s>Conscious of its spiritual and moral heritage <break time="300ms"/>, the Union is founded on the indivisible, universal values of human dignity, freedom, equality and solidarity. It is based on the principles of democracy and the rule of law <break time="500ms"/>. </s> <s> It places the individual at the heart of its activities, by establishing the citizenship of the Union and by creating an area of freedom, security and justice.</s></p>';
const US_SSML_EXPRESSIVE = '<speak>I have been assigned to handle your order status request.<express-as type="Apology"> I am sorry to inform you that the items you requested are back-ordered. We apologize for the inconvenience.</express-as><express-as type="Uncertainty"> We don\'t know when those items will become available. Maybe next week but we are not sure at this time.</express-as><express-as type="GoodNews">Because we want you to be a happy customer, management has decided to give you a 50% discount! </express-as></speak>';
const US_GB_SSML = '<p><s>Conscious of its spiritual and moral heritage <break time="300ms"/>, the Union is founded on the indivisible, universal values of <prosody rate="-15%">human dignity, freedom, equality and solidarity.</prosody> It is based on the principles of democracy and the rule of law <break time="500ms"/>. </s> <s> It places the individual at the heart of its activities, <prosody rate="+15%">by establishing the citizenship of the Union</prosody> and by creating an area of freedom, security and justice.</s></p>';
const DE_SSML = '<p><s>In dem Bewusstsein ihres geistig-religiösen und sittlichen <phoneme alphabet="ibm" ph=".1R.0bIs">Erbes</phoneme> <break time="300ms"/> gründet sich die Union auf die <prosody rate="-15%">unteilbaren und universellen Werte der Würde des Menschen, der Freiheit, der Gleichheit und der Solidarität.</prosody> Sie beruht auf den Grundsätzen der Demokratie und der Rechtsstaatlichkeit<break time="1s"/>. Sie stellt den Menschen in den Mittelpunkt ihres <phoneme alphabet="ibm" ph=".1hAn.0d@lns"> Handelns</phoneme>, <prosody rate="+10%">indem sie die Unionsbürgerschaft und einen Raum der Freiheit, der Sicherheit und des Rechts begründet.</prosody></s></p>';
const IT_SSML = '<p><s>Consapevole del suo patrimonio spirituale e morale<break time="300ms"/>, l\'Unione si fonda sui valori indivisibili e universali della dignità umana, <prosody rate="-15%">della libertà, dell\'uguaglianza e della solidarietà; </prosody> essa si basa sul principio della democrazia e sul principio dello Stato di diritto<break time="500ms"/>.</s><s> Pone la persona al centro della sua azione istituendo la cittadinanza dell\'Unione e creando uno spazio di libertà, sicurezza e giustizia.</s></p>';
const IT_SSML_DNN = '<p><s>Consapevole del suo patrimonio spirituale e morale<break time="300ms"/>, l\'Unione si fonda sui valori indivisibili e universali della dignità umana, della libertà, dell\'uguaglianza e della solidarietà; essa si basa sul principio della democrazia e sul principio dello Stato di diritto<break time="500ms"/>.</s><s> Pone la persona al centro della sua azione istituendo la cittadinanza dell\'Unione e creando uno spazio di libertà, sicurezza e giustizia.</s></p>';
const JP_SSML = '<p><s>精神的、そして道徳的な遺産を<break time="300ms"/>意識的に受け継いで、<prosody rate="-15%">人間の尊厳、自由、平等、連帯の不可分で普遍的な価値を大前提として</prosody>連合は設立される。すなわち、連合は民主主義と法治の原則に立脚する。<break time="500ms"/>連合は市民権を確立し、自由と安全、正義が確保された地域を創造することによって、その組織活動の中心に個人を置く。</s></p>';
const PT_SSML = '<p><s>Consciente do seu patrimônio espiritual e moral<break time="300ms"/>, a União é fundamentada nos valores indivisíveis e universais da dignidade humana, <prosody rate="-15%">liberdade, igualdade e solidariedade; </prosody> é baseada nos princípios da democracia e estado de direito<break time="500ms"/>. </s> <s> <prosody rate="+15%">Ela coloca o indivíduo no centro de suas ações, </prosody> ao instituir a cidadania da União e ao criar um espaço de liberdade, segurança e justiça.</s></p>';

Expand All @@ -25,6 +27,8 @@ const US_VOICE_SSML_ALLISON = 'Hello! I\'m Allison, but you can change my voice

// Sample text values with Voice Transformation SSML (Lisa)
const US_VOICE_SSML_LISA = 'Hello! I\'m Lisa, but you can change my voice however you wish. <voice-transformation type="Custom" glottal_tension="-80%"> For example, you can make my voice a bit softer, </voice-transformation> <voice-transformation type="Custom" glottal_tension="40%" breathiness="40%"> or a bit strained. </voice-transformation><voice-transformation type="Custom" timbre="Breeze" timbre_extent="60%"> You can alter my voice timbre making me sound like this person, </voice-transformation> <voice-transformation type="Custom" timbre="Sunrise"> or like another person in your different applications. </voice-transformation><voice-transformation type="Custom" breathiness="90%"> You can make my voice more breathy than it is normally. </voice-transformation><voice-transformation type="Young" strength="80%"> I can speak like a young girl. </voice-transformation><voice-transformation type="Custom" pitch="20%" pitch_range="80%" rate="60%" glottal_tension="-80%" timbre="Sunrise"> And you can combine all this with modifications of my speech rate and my tone. </voice-transformation>';
const US_VOICE_SSML_MICHAEL = 'Hello! I\'m Michael, but you can change my voice however you wish. <voice-transformation type="Custom" glottal_tension="-80%"> For example, you can make my voice a bit softer, </voice-transformation> <voice-transformation type="Custom" glottal_tension="40%" breathiness="40%"> or a bit strained. </voice-transformation><voice-transformation type="Custom" timbre="Breeze" timbre_extent="60%"> You can alter my voice timbre making me sound like this person, </voice-transformation> <voice-transformation type="Custom" timbre="Sunrise"> or like another person in your different applications. </voice-transformation><voice-transformation type="Custom" breathiness="90%"> You can make my voice more breathy than it is normally. </voice-transformation><voice-transformation type="Young" strength="80%"> I can speak like a young boy. </voice-transformation><voice-transformation type="Custom" pitch="20%" pitch_range="80%" rate="60%" glottal_tension="-80%" timbre="Sunrise"> And you can combine all this with modifications of my speech rate and my tone. </voice-transformation>';


const voices = [
{
Expand Down Expand Up @@ -59,6 +63,39 @@ const voices = [
ssml: JP_SSML,
},
description: 'Emi: Japanese (日本語) female voice.',
}, {
name: 'en-US_MichaelVoice',
language: 'en-US',
option: 'American English (en-US): Michael (male, transformable)',
customizable: true,
gender: 'male',
url: 'https://stream.watsonplatform.net/text-to-speech/api/v1/voices/en-US_MichaelVoice',
supported_features: {
voice_transformation: true,
custom_pronunciation: true,
},
demo: {
text: US_TEXT,
ssml: US_SSML,
ssml_voice: US_VOICE_SSML_MICHAEL,
},
description: 'Michael: American English male voice. Dnn technology.',
}, {
name: 'en-US_MichaelV2Voice',
language: 'en-US',
option: 'American English (en-US): MichaelV2 (male, dnn technology)',
customizable: true,
gender: 'male',
url: 'https://stream.watsonplatform.net/text-to-speech/api/v1/voices/en-US_MichaelV2Voice',
supported_features: {
voice_transformation: false,
custom_pronunciation: true,
},
demo: {
text: US_TEXT,
ssml: US_SSML_DNN,
},
description: 'Michael: American English male voice. Dnn technology.',
}, {
name: 'en-US_AllisonVoice',
option: 'American English (en-US): Allison (female, expressive, transformable)',
Expand All @@ -76,6 +113,22 @@ const voices = [
ssml_voice: US_VOICE_SSML_ALLISON,
},
description: 'Allison: American English female voice.',
}, {
name: 'en-US_AllisonV2Voice',
option: 'American English (en-US): AllisonV2 (female, dnn technology)',
language: 'en-US',
customizable: true,
gender: 'female',
url: 'https://stream.watsonplatform.net/text-to-speech/api/v1/voices/en-US_AllisonV2Voice',
supported_features: {
voice_transformation: false,
custom_pronunciation: true,
},
demo: {
text: US_TEXT,
ssml: US_SSML_DNN,
},
description: 'Allison: American English female voice. Dnn technology.',
}, {
name: 'fr-FR_ReneeVoice',
option: 'French (fr-FR): Renee (female)',
Expand Down Expand Up @@ -108,6 +161,22 @@ const voices = [
ssml: IT_SSML,
},
description: 'Francesca: Italian (italiano) female voice.',
}, {
name: 'it-IT_FrancescaV2Voice',
option: 'Italian (it-IT): FrancescaV2 (female, dnn technology)',
language: 'it-IT',
customizable: true,
gender: 'female',
url: 'https://stream.watsonplatform.net/text-to-speech/api/v1/voices/it-IT_FrancescaV2Voice',
supported_features: {
voice_transformation: false,
custom_pronunciation: true,
},
demo: {
text: IT_TEXT,
ssml: IT_SSML_DNN,
},
description: 'Francesca: Italian (italiano) female voice. Dnn technology.',
}, {
name: 'es-ES_LauraVoice',
language: 'es-ES',
Expand Down Expand Up @@ -189,6 +258,22 @@ const voices = [
ssml_voice: US_VOICE_SSML_LISA,
},
description: 'Lisa: American English female voice.',
}, {
name: 'en-US_LisaV2Voice',
option: 'American English (en-US): LisaV2 (female, dnn technology)',
language: 'en-US',
customizable: true,
gender: 'female',
url: 'https://stream.watsonplatform.net/text-to-speech/api/v1/voices/en-US_LisaV2Voice',
supported_features: {
voice_transformation: false,
custom_pronunciation: true,
},
demo: {
text: US_TEXT,
ssml: US_SSML_DNN,
},
description: 'Lisa: American English female voice. Dnn technology',
}, {
name: 'en-GB_KateVoice',
option: 'British English (en-GB): Kate (female)',
Expand Down

0 comments on commit bce78f2

Please sign in to comment.