


                                  G V o i c e

                                 Version 1.00



                    Copyright (C) 1996-97 by Tamas Vincze.
                             All rights reserved.

                           Written by Tamas Vincze.
                    (Also known as Gza of 220 Volt Team.)



     INTRODUCTION
     ~~~~~~~~~~~~
     GVoice is  not a  stand-alone program.  It's a collection of programs
     such as GVoiceTSR or GVoiceTape.

     The reason  I wrote  these programs  is that I couldn't find any DOS-
     based program to use the voice capabilities of my Sportster.

     So here it is! For free!

     The GVoice  package currently  contains two  programs: GVoiceTape and
     GVoiceTSR.

     GVoiceTape can be used to record messages via the built-in microphone
     of the  modem and  to play back messages through the modem's speaker.
     All messages  are stored  as plain  ADPCM data,  as it comes from the
     modem, so  you can't  use any  other device/program  (e.g. your sound
     card) to  record/play voice  files used by GVoice programs, except if
     you got a converter program for your modem.

     GVoiceTSR, as  its name  says, is a TSR (Terminate and Stay Resident)
     program. It  hooks into the FOSSIL driver's INT 14h chain, and it can
     be activated by sending a special character string to the modem.

     GVoiceTSR is  made especially  for BBS  use, to  discriminate between
     voice and  data/fax calls.  GVoiceTSR handles voice calls on its own,
     while data  and fax  calls  are  passed  back  to  the  mailer.  With
     GVoiceTSR you  can run your BBS 24 hours a day and you are still able
     to receive voice calls on the same phone line!

     Please note that fax receiving is not supported yet. It'll be done in
     the near future.


     DISCLAIMER
     ~~~~~~~~~~
     THIS PROGRAM  IS PROVIDED "AS IS" AND COMES WITH NO WARRANTIES OF ANY
     KIND, EITHER  EXPRESSED OR  IMPLIED. IN  NO EVENT SHALL THE AUTHOR BE
     LIABLE TO  YOU OR  ANYONE ELSE  FOR ANY  DAMAGES, INCLUDING  ANY LOST
     PROFITS, LOST  SAVINGS OR  OTHER INCIDENTAL  OR CONSEQUENTIAL DAMAGES


                                    - 1 -

     ARISING OUT  OF THE  USE OR  INABILITY TO USE THIS SOFTWARE. THE USER
     ASSUMES FULL RESPONSIBILITY FOR THE USE OF THIS SOFTWARE.


     FREEWARE
     ~~~~~~~~
     This software is a FREEWARE product, so NO charge may be made for its
     distribution. It  is NOT a commercial product and the ONLY acceptable
     charge for  it will  be the  actual, physical  cost  of  duplication,
     storage and  handling. You  may freely  distribute this  software  to
     anyone you  like, as  long as  all  the  files  in  the  archive  are
     unchanged (including  this documentation), and all are included. This
     software must  NOT be  included in  a commercial  release without the
     author's written and signed permission. Distribution on shareware CD-
     ROMs is allowed without any limitations or restrictions.

     The GVoice software package is Copyright (C) 1996-97 by Tamas Vincze.
     All rights reserved.

     Other products  mentioned are  copyrighted by their respective owners
     and include  their own  restrictions  for  use.  Please  be  sure  to
     register those  shareware products  if  requested  by  the  copyright
     holders.


     HARDWARE REQUIREMENTS
     ~~~~~~~~~~~~~~~~~~~~~
     The GVoice  package has  been succesfully  tested  with  these  modem
     types:
       USRobotics Sportster Vi 33600,
       UMC-based Zoltrix voice 14400.

     The modem  type is  not checked by any of the GVoice programs. If you
     have other  type of modem (and you are a bit lucky:) the programs may
     work fine  with your  modem. Although it is possible that you have to
     change one  or more init strings in GVSetup. In this case please send
     me your settings and I will put them into this document.

     The 1300Hz calling tone detection didn't work on my Sportster (it was
     a firmware bug, but USR has sent me a new eprom), so I had to plug an
     external PLL decoder into the modem's speaker jack. It detects 1300Hz
     calling tones  and reports them to GVoiceTSR via the printer port. If
     you also  have this  problem and  want to use the LPT port 'feature',
     you have  to build  your own  PLL decoder  which holds pin 15 (-ERROR
     input) of  the LPT  port low  while it  detects the  1300Hz tone. You
     should also  specify the  printer port's  base  address  you  use  in
     GVSetup.


     SOFTWARE REQUIREMENTS
     ~~~~~~~~~~~~~~~~~~~~~
       Some kind  of operating system, which is able to run DOS programs.
        ;-)

       FOSSIL driver  (e.g. BNU  or X00)  locked at  38400 or  higher bps
        rate.



                                    - 2 -

       Front-end software is required by GVoiceTSR (I use Xenia Mailer).


     INSTALLATION
     ~~~~~~~~~~~~
     Create a  new directory  anywhere on  your hard  disk and  unpack the
     distribution archive to that directory. GVoiceTSR needs to know where
     this directory  is, so you must set the environment variable GVTSR to
     point to  this  directory.  You  should  put  a  line,  such  as  SET
     GVTSR=C:\GVOICE in your AUTOEXEC.BAT to make things easy.

     Additionally you  should create  one more  direcory opening  from the
     home directory,  named MESSAGES.  Following the  above example,  this
     would be C:\GVOICE\MESSAGES. The voice messages recorded by GVoiceTSR
     will be placed here.


     CONFIGURATION
     ~~~~~~~~~~~~~
     Run GVSETUP.EXE  and try  to set up everything correctly. GVoiceSetup
     modifies GVoice  programs directly,  which are  found in  the current
     directory.

     GVoiceSetup doesn't  modify the  GVoiceTSR  code  already  loaded  in
     memory! After you saved the new configuration into GVTSR.COM you must
     unload and  then reload  GVoiceTSR  in  order  to  make  the  changes
     effective.

     I made  (almost) every  modem command directly editable in GVSetup in
     order to  increase the  number of  modems  supported.  This  has  the
     disadvantage that  you must  be  familiar  with  your  modem's  voice
     command set to be able to change even some basic settings.

     By default, GVoice is configured for Rockwell compatible modems using
     the following commands: (note that all commands must be starting with
     "AT")

     #CLS=0         Switch to data mode
     #CLS=2         Switch to fax class 2 mode
     #CLS=8         Switch to voice mode
     #VBS=4         Selects 4 bits per sample ADPCM compression
     #VLS=0         Select phone line only
     #VLS=1         Select handset only
     #VLS=2         Select speaker only
     #VLS=3         Select microphone only
     #VLS=4         Select both phone line and speaker
     #VRX           Voice receive
     #VTX           Voice transmit
     #VSS=0         Disable silence detection
     #VSS=2         Set silence detection tuner to midrange
     #VSP=n         Set silence  detection period to n. The parameter n is
                    in units  of 100  ms. E.g.  AT#VSP=30 sets the silence
                    detection period to 3 seconds
     #VTD=3F,3F,3F  Enables every tone detection feature (e.g. DTMF codes,
                    calling tones, busy signal, etc.)




                                    - 3 -

     See your  modem manufacturer's  documents for  the complete  list  of
     voice commands you can use.


     GVoiceTape USAGE
     ~~~~~~~~~~~~~~~~
     GVoiceTape has  two operating  modes: interactive  and  command  line
     controlled.

     GVoiceTape can  be started  in interactive mode by running GVTAPE.COM
     without  any   command  line   parameters.  In  this  case  the  file
     ADPCMTMP.$$$ is used for record/playback. Additionally you can supply
     a file name on the command line to use instead of ADPCMTMP.$$$.

     GVoiceTape can  be started  in automatic  record mode or in automatic
     play back  mode by  running GVTAPE.COM  with /R  or /P on the command
     line. Unless  you specify  a file name after these switches, the file
     ADPCMTMP.$$$ will be used.


     GVoiceTSR USAGE
     ~~~~~~~~~~~~~~~~
     GVoiceTSR doesn't  use any command line switches, it can be installed
     by simply  running GVTSR.COM.  If you  want to  unload GVoiceTSR form
     memory, run GVTSR.COM again.

     GVoiceTSR MUST  be installed  AFTER the  FOSSIL driver! If the FOSSIL
     driver re-captures INT14h, you must unload and then reload GVoiceTSR.

     GVoiceTSR requires  the presence of a front-end software (e.g. a fido
     mailer) which  detects RING  singnals coming  from the modem and then
     answers the call. In normal circumstances the mailer answers the call
     by sending  an ATA  to the modem. But we want GVoiceTSR to answer the
     call instead  of the  mailer. The  solution is to change the mailer's
     answer string from "ATA<CR>" to

                     "GVOICE<delay>T<delay>S<delay>R<CR>".

     This is  case sensitive,  so you  must use  uppercase  letters.  <CR>
     stands for Carriage Return and <delay> stands for a delay of at least
     1/4th seconds.  This delay  is needed  to  supply  a  guard  time  to
     GVoiceTSR in  order to  prevent it from popping up when it shouldn't.
     (The string  GVOICETSR<CR> could  be found  in normal  data  flow  as
     well!)

     You  must  see  your  mailer's  documentation  to  find  the  special
     characters that  can be  used in  modem command  strings in  order to
     implement <delay>  and <CR>.  Xenia mailer,  for example, uses "|" as
     <CR> and  "`" as  a 1/20th  second delay.  Xenia users  can use  this
     answer string in their modem configuration file:

                       ANSWER !GVOICE`````T`````S`````R|

     When GVoiceTSR  detects this  special answer  string, it  pops up and
     initializes the  modem to  voice mode. Then plays the ADPCM data file
     HALLO.PCM to  the caller.  This file (and all the others!) must be in
     the directory you specified by the GVTSR environment variable.


                                    - 4 -

     HALLO.PCM contains a simple "Hallo!", which makes human callers think
     that another human said that, so they hopefully also say "Hallo!", by
     which GVoiceTSR knows that it has a human caller.

     After GVoiceTSR said Hallo!, it analyzes the call for about 3 seconds
     (changeable in  GVSetup). During this period if it detects silence or
     calling tones,  it tells  the modem  to answer  in data/fax mode, and
     immediately gives  back the  control to  the mailer.  After this, the
     mailer will  receive the  result  of  the  data/fax  handshake  (e.g.
     CONNECT or NO CARRIER).

     If a  voice caller  is detected,  there are  two ways  to go  on.  If
     someone is  there to  pick up the phone, GVoiceTSR will try to signal
     that there's  a voice caller and someone should pick up the phone. If
     nobody picks  up the  phone in  a given  time interval, the caller is
     told that he/she can leave a message.

     If nobody  is available  to pick up the phone, GVoiceTSR won't signal
     the voice  call, instead  it will  try to record the caller's message
     immediately.

     How does  GVoiceTSR know  that someone  is available  to pick  up the
     phone? The answer is very simple: you tell it by means of creating or
     deleting a semaphore file. If this file exists, it means that someone
     is available at the phone. (When you arrive home you create the file,
     and before  you leave  you delete  the file.)  This semaphore file is
     named I_M_HOME.SEM  and should  be placed  in the directory where the
     GVTSR environment variable points.

     Case 1: someone is available to pick up the phone
     (Semaphore file exists)

     The file  WAIT.PCM is  played to  the caller.  This should  tell  the
     caller to  wait a  minute for someone to pick up the phone. This time
     the PC  speaker will  start ringing. If you are home, you should pick
     up the  phone, press  a key on the PC's keyboard and you are ready to
     talk with  the caller.  The beeping will stop, a NO CARRIER string is
     placed in the FOSSIL's input buffer, and the control is returned back
     to the  mailer. The  mailer will receive the NO CARRIER string, so it
     will think that the data caller has hung up.

     If you don't press a key on the PC keyboard in a given time after the
     beeping has  started, the  file NONEHOME.PCM is played to the caller.
     This should  tell the caller that nobody has picked up the phone, but
     he/she can  still leave  a message.  Immediately after the playing of
     this file, GVoiceTSR will start recording the caller's message.

     Case 2: nobody is available to pick up the phone
     (Semaphore file deleted)

     The file  LEAVEMES.PCM is played to the caller. This tells the caller
     that nobody  is home,  and he/she  can leave  a message.  Immediately
     after the  playing of  this file,  GVoiceTSR will start recording the
     caller's message.

     From now on, both cases go on the same way.



                                    - 5 -

     The caller's  message  is  recorded  into  a  file  in  the  MESSAGES
     directory (which you have created during installation). The file name
     will be  yyyymmdd.#nn, where yyyy is the year, mm is the month, dd is
     the day  and nn  is the  message number  (e.g. 19960918.#03). Message
     numbering starts  at 01  every day  after midnight,  and the  largest
     number can  be 99.  After the  99th call  GVoiceTSR won't  be able to
     record more  messages, so instead of NONEHOME.PCM or LEAVEMES.PCM the
     file named  FULL.PCM will be played. This should tell the caller that
     his/her message can't be recorded, and to try calling again later.

     The recording of a message will stop after the detection of 4 seconds
     of continous  silence (can be changed in GVSetup), or if dial tone or
     busy signal  is detected.  After the  recording is  finished and  the
     caller didn't  hung up,  the file BYE.PCM is played. This simply says
     good-bye to the caller.


     ERROR CODES
     ~~~~~~~~~~~
     GVoice programs  mainly report error codes instead of error messages.
     All codes are hexadecimal!

     The meaning of these error codes are as follows:

     00 - No error (shouldn't get this one!).
     01 - FOSSIL's output buffer full (but it shouldn't be).
     02 - Didn't get desired response (e.g. "OK"). (Modem timed out.)
     03 - Couldn't create file.
     04 - Couldn't write to file.
     05 - Couldn't close file.
     06 - Couldn't open file.
     07 - Couldn't read from file.
     08 - Character expected  from modem,  but got  nothing. (Modem  timed
          out.)
     09 - Modem hasn't accepted character. (Modem timed out.)
     0A - Couldn't stop  modem, it  keeps sending  data (in  voice receive
          mode).
     0B - User break. The user has pressed [Esc] during voice receive mode
          or voice transmit mode.


     HISTORY
     ~~~~~~~
     + : new feature,
     * : change (improvement or bugfix).

     V1.00 (Rev. 1996 Sep 18) : private beta release;
             + added documentation;
             + added GVSetup;
             + semaphore file support;
             + user break support.

     V1.00 (Rev. 1996 Sep 28) : private beta release;
             + support for monochrome displays.

     V1.00 : first public release;
             * improved GVSetup.


                                    - 6 -

     SUPPORT, NEW VERSIONS
     ~~~~~~~~~~~~~~~~~~~~~
     New versions  of  GVoice  will  be  available  at  the  author's  BBS
     (Electric Ladyland)  located in  Szeged, Hungary.  The BBS  currently
     accepts calls  from 23:00  to 16:00  CET (weekdays) and from 23:00 to
     10:00 CET (weekends). Please don't call outside these hours!

     FidoNet node number is 2:370/36.

     You can  freq the latest version by requesting the magic name GVOICE,
     or you can download it from file area #74 (GVoice support area).

     Support is also available on the internet:

     http://bubu.teleki.jgytf.u-szeged.hu/ell


     CONTACTING THE AUTHOR
     ~~~~~~~~~~~~~~~~~~~~~
     If you  have any  questions or  suggestions, found a bug, or whatever
     reason, please feel free to contact me.

     English isn't  my first  language, so  if you find any grammatical or
     spelling mistake please let me know.

     Send FidoNet netmail to: Tamas Vincze, 2:370/36,
     or Internet e-mail to: tamas_vincze@electric.fido.hu,
     or see  the web  page for  my current  e-mail address  (that  is  the
     fastest way I receive your mail).

     If you  find these  programs useful  you may  also drop me a line. It
     would be  great if  you write  me what  type of  modem you  use  with
     GVoice.


























                                    - 7 -
