diff --git a/commands/fun/tts/sam.js b/commands/fun/tts/sam.js index ac258e3d..63807ee5 100644 --- a/commands/fun/tts/sam.js +++ b/commands/fun/tts/sam.js @@ -33,6 +33,10 @@ class samCommand extends Command { i = pitch.length; } } + if (pitch > 200) + pitch = 200; + else if (pitch < 50) + pitch = 50; } else { pitch = 100; } @@ -47,6 +51,10 @@ class samCommand extends Command { i = speed.length; } } + if (speed > 450) + speed = 450; + else if (speed < 30) + speed = 30; } else { speed = 150; } diff --git a/commands/fun/tts/samvc.js b/commands/fun/tts/samvc.js index 2595fe5d..469ab9a6 100644 --- a/commands/fun/tts/samvc.js +++ b/commands/fun/tts/samvc.js @@ -33,6 +33,10 @@ class samvcCommand extends Command { i = pitch.length; } } + if (pitch > 200) + pitch = 200; + else if (pitch < 50) + pitch = 50; } else { pitch = 100; } @@ -47,6 +51,10 @@ class samvcCommand extends Command { i = speed.length; } } + if (speed > 450) + speed = 450; + else if (speed < 30) + speed = 30; } else { speed = 150; }