bark bark woof ruff bark. bark bark bark!

This commit is contained in:
Eric Rosenbaum 2018-09-12 13:23:26 -04:00
parent 91d2663c35
commit 6ac82f3183

View file

@ -50,11 +50,6 @@ const MONSTER_ID = 'MONSTER';
*/ */
const KITTEN_ID = 'KITTEN'; const KITTEN_ID = 'KITTEN';
/**
* An id for one of the voices.
*/
const PUPPY_ID = 'PUPPY';
/** /**
* Class for the text2speech blocks. * Class for the text2speech blocks.
* @constructor * @constructor
@ -133,15 +128,6 @@ class Scratch3SpeakBlocks {
}), }),
gender: 'female', gender: 'female',
playbackRate: 1.4 playbackRate: 1.4
},
[PUPPY_ID]: {
name: formatMessage({
id: 'text2speech.puppy',
default: 'puppy',
description: 'A baby dog.'
}),
gender: 'male',
playbackRate: 1.4
} }
}; };
} }
@ -319,14 +305,6 @@ class Scratch3SpeakBlocks {
words = words.replace(/\w+/g, 'meow'); words = words.replace(/\w+/g, 'meow');
} }
// @todo localize this?
if (state.voiceId === PUPPY_ID) {
words = words.replace(/\w+/g, 'bark');
words = words.split(' ').map(() => ['bark', 'woof', 'ruff'][Math.floor(Math.random() * 3)])
.join(' ');
locale = 'en-GB';
}
// Build up URL // Build up URL
let path = `${SERVER_HOST}/synth`; let path = `${SERVER_HOST}/synth`;
path += `?locale=${locale}`; path += `?locale=${locale}`;