# Copyright (C) 2003 Brailcom, o.p.s
# Copyright (C) 2006 Gary Cramblitt <garycramblitt@comcast.net>
# Copyright (C) 2014 Hussain Jasim <hussainmkj@gmail.com>
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# 
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.  See the GNU General Public License for more details (file
# COPYING in the root directory).
# 
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.
#
@ Hi, this is a basic Speech Dispatcher test.

@ I've successfully connected to the server
@ and now I'm going to try to set my client name
@ and priority for the messages.
$4
!SET SELF CLIENT_NAME unknown_user:test-basic:main
$4
!SET SELF PRIORITY MESSAGE
$4

@ Hope it was ok. Now I can try to say something:
$8
!SPEAK
Hello world, this is Speech Dispatcher speaking.
. 
$2
@ If you heard the full message, Speech Dispatcher
@ works correctly.
$8


@ Now we will try some settings.
$2
@ This message should be said very quickly...
$4
!SET SELF RATE +80
!SPEAK
You have to run as fast as you can just to stay where you are.
If you want to get anywhere, you'll have to run much faster.
        -- Lewis Carroll
.
$8


@ ...and this very slowly.
$4
!SET SELF RATE -80
!SPEAK
There is more to life than increasing its speed.
        -- Mahatma Gandhi
.
$8


@ We will keep the rate at this level and try to make the voice
@ whisper by increasing its pitch.
$4
!SET SELF PITCH 90
!SPEAK
Do not believe in miracles -- rely on them.
.
$8

@ We will keep the pitch at this level and try to increase the pitch range.
$4
!SET SELF PITCH_RANGE 75
!SPEAK
War has always been the grand sagacity of every spirit which has grown too inward and too profound; its curative power lies even in the wounds one receives.
.
$8

@ This time, we will return to normal speed, but decrease the pitch.
@ Some distortion is probably unavoidable.
$4
!SET SELF RATE 0
!SET SELF PITCH -90
!SPEAK
I detest that man who hides one thing in the depths of his heart, and speaks for another.
        -- Homer (800 BC - 700 BC)
.
$8

@ Let's return to normal but try speaking loudly.
@ Since most synthesizers already speak near maximum volume, you may not
@ hear any difference.
$4
!SET SELF PITCH 0
!SET SELF VOLUME 90
!SPEAK
Actions lie louder than words.
        -- Carolyn Wells
.
$8

@ And finally, very softly.
$4
!SET SELF VOLUME -90
!SPEAK
What you do speaks so loud that I cannot hear what you say.
        -- Ralph Waldo Emerson (1803 - 1882)
.
$8

!QUIT

@ If the tests did what was expected, your installation of Speech Dispatcher
@ probably works fine. If not, there can be different causes, see
@ the documentation -- Troubleshooting. (Note that some synthesizers
@ don't have to support setting of the voice parameters. If everything
@ else worked correctly, this is not a fatal problem.).

