Only in .: CHANGES
Only in .: Makefile
diff ./buildindex /projects/cslu/speech/work/src.beta/bin_share//buildindex
3c3
< # $Id: buildindex,v 1.1 1993/08/31 20:45:35 johans Exp $
---
> # $Id: buildindex,v 1.9 1993/05/07 00:39:32 noel Exp $
diff ./findphone /projects/cslu/speech/work/src.beta/bin_share//findphone
3c3
< # $Id: findphone,v 1.1 1993/08/31 20:45:41 johans Exp $
---
> # $Id: findphone,v 1.19 1993/05/10 20:16:28 noel Exp $
diff ./label_confuse /projects/cslu/speech/work/src.beta/bin_share//label_confuse
3c3
< # $Id: label_confuse,v 1.1 1993/08/31 20:41:33 johans Exp $
---
> # $Id: mlabel,v 1.3 92/04/21 16:30:37 pochmara Exp $
diff ./mlabel /projects/cslu/speech/work/src.beta/bin_share//mlabel
3c3
< # $Id: mlabel,v 1.1 1993/08/31 20:42:24 johans Exp $
---
> # $Id: mlabel,v 1.3 92/04/21 16:30:37 pochmara Exp $
diff ./noptreport /projects/cslu/speech/work/src.beta/bin_share//noptreport
3c3
< # $Id: noptreport,v 1.1 1993/08/31 20:42:39 johans Exp $
---
> # $Id: noptreport,v 1.4 92/01/21 15:10:13 pochmara Exp $
diff ./noptrun /projects/cslu/speech/work/src.beta/bin_share//noptrun
3c3
< # $Id: noptrun,v 1.1 1993/08/31 20:43:13 johans Exp $
---
> # $Id: noptrun,v 1.8 1993/05/17 16:40:40 fanty Exp $
diff ./speechplay /projects/cslu/speech/work/src.beta/bin_share//speechplay
11,16c11,14
< $! = 1;
< $usage = "Usage: speechplay [options] <adcfile>\n".
<          "       options are:\n".
<          "         -x       use external speaker\n".
<          "         -v[vol]  specify volume\n".
<          "         -        use STDIN as input\n";
---
> if ($#ARGV < 0) {
>   print "Usage: speechplay [options] <adcfile>\n";
>   exit 1;
> }
18c16,17
< ($#ARGV >= 0) || die($usage);
---
> $host=`hostname`;
> chop($host);
20,21d18
< $host=`hostname`; chop($host);
< 
30d26
< $speech = "/projects/cslu/speech";
32d27
< 
35,36c30,32
< $ext = "-x" if ($ENV{"PLAY_EXT"});
< $volume = $ENV{"PLAY_VOL"} if ($ENV{"PLAY_VOL"});
---
> if ($ENV{"PLAY_EXT"}) {
>   $ext = "-x";
> }
37a34,36
> if ($ENV{"PLAY_VOL"}) {
>   $volume = $ENV{"PLAY_VOL"};
> }
48,51d46
<   elsif ($arg eq "-")   {    # use stdin as file
<     $stdin = 1;
<   }
<   elsif ($arg =~ /^-/)  {die($usage);}
53d47
<     die($usage) if(defined($adcfile) || $stdin);
58a53,65
> # Get the path.  If an absolute path was specified on the command line then
> # don't use the cwd.
> 
> @tmp = split("",$adcfile);
> 
> if ($tmp[0] ne "/") {
>   $cwd = `pwd`;
>   chop($cwd);
>   $adcfile = $cwd . "/" . $adcfile;
>   $adcfile =~ s/amd\/lydia//;
> }
> 
> 
61c68
< if (($display eq ":0.0") || ($display eq "")) {
---
> if ($display eq ":0.0") {
69,70c76,78
< # See if we are playing on the same machine that the display is at.  If so
< # we must be on either a sun4 or decmips machine.
---
> # See if we are playing on the same machine that the display is at.  If so there is 
> # no need to do an rsh.  Otherwise, set $rshcommand to access the appropriate
> # display.
72,91c80,81
< if ($sound_at eq $host) {
<   &create_adcfile if($stdin);
<   if (&sun4($sound_at))		# SUN4
<     {
<       system("$speech/new/bin/sun4/autogain $adcfile /usr/tmp/$$gain.adc");
<       system("$speech/new/bin/sun4/sparcplay $ext -v $volume /usr/tmp/$$gain.adc");
<     }
<   elsif (&decmips($sound_at))	# DECMIPS
<     {
<       $ENV{"AUDIOFILE"} = "$host:0";
<       system("$speech/new/bin/decmips/wav2mu $adcfile /usr/tmp/$$.mu");
<       system("$speech/bin/decmips/aplay -f -g $volume /usr/tmp/$$.mu");
<     }
<   elsif (&alpha($sound_at))	# ALPHA
<     {
<       $ENV{"AUDIOFILE"} = "$host:0";
<       system("$speech/new/bin/alpha/speech2mu -f $adcfile -o /usr/tmp/$$.mu");
<       system("$speech/unsup/bin/alpha/aplay -f -g $volume /usr/tmp/$$.mu");
<     }
<   else {die("unknown host $host\n");}
---
> if ($sound_at eq $host) {   
>   $rshcommand = "";
93,119c83,84
< 
< 
< # If we are playing on a different machine from the host, use rsh to play
< # remotely unless we're on a mac or an xterm
< 
< else {				# $sound_at != $host
<   if (&macintosh($sound_at))	# MACINTOSH
<     {
<       &create_adcfile if($stdin);
<       system("wav2adc $adcfile /usr/tmp/$$.adc");
<       system("rplay -host $sound_at /usr/tmp/$$.adc 2> /dev/null");
<     }
<   elsif (&xterm($sound_at))	# XTERM
<     {
<       $arch = `arch`; chop $arch;
<       $create_adcfile if($stdin);
<       if (($arch eq "decmips") || ($arch eq "sun4")) {
< 	system("$speech/unsup/bin/$arch/auctl set device 2 gain = 2");
< 	system("$speech/unsup/bin/$arch/speech2snd $adcfile | $speech/unsup/bin/$arch/auplay -v 100");
<       }
<       else {die("Can't play from arch $arch\n");}
<     }
<   else {
<     $speechplay = "/projects/cslu/speech/new/bin/share/speechplay";
<     $rshcommand = "cat $adcfile | rsh $sound_at $speechplay -v$volume $ext -";
<     system($rshcommand);
<   }
---
> else {
>   $rshcommand = "rsh -n $sound_at ";
122c87,89
< unlink(</usr/tmp/$$*.*>);
---
> #print "host: $host\n";
> #print "sound_at: $sound_at\n";
> #print "volume: $volume\n";
123a91,92
> # determine what play command to use.  This is based on what machine the sound will 
> # be played on.
125,126c94,101
< sub sun4 {
<   local($sound_at) = @_;
---
> if (($sound_at =~ /stanley.*/) ||
>     ($sound_at =~ /oliver.*/)  ||
>     ($sound_at =~ /jake.*/)    ||
>     ($sound_at =~ /elwood.*/)  ||
>     ($sound_at =~ /gracie.*/)  ||
>     ($sound_at =~ /lily.*/)    ||
>     ($sound_at =~ /butch.*/)    ||
>     ($sound_at =~ /charlie.*/) ) {
128,138c103,105
<   (($sound_at eq "cagney") ||
<    ($sound_at eq "zeppo")  ||
<    ($sound_at eq "gummo")  ||
<    ($sound_at eq "abbott")  || 
<    ($sound_at eq "costello")  || 
<    ($sound_at eq "seinfeld")  ||        
<    ($sound_at eq "gilda")  || 
<    ($sound_at eq "chico") ||
<    ($sound_at eq "sake") ||
<    ($sound_at eq "anago") ||
<    ($sound_at eq "vitus"));
---
>   system("wav2adc $adcfile /usr/tmp/$$.adc");
>   system("rplay -host $sound_at /usr/tmp/$$.adc 2> /dev/null");
>   system("/usr/bin/rm /usr/tmp/$$.adc");
140a108,117
> elsif (($sound_at eq "cagney") ||
>        ($sound_at eq "zeppo")  ||
>        ($sound_at eq "gummo")  ||
>        ($sound_at eq "harpo")  || 
>        ($sound_at eq "abbott")  || 
>        ($sound_at eq "costello")  || 
>        ($sound_at eq "seinfeld")  ||        
>        ($sound_at eq "gilda")  || 
>        ($sound_at eq "chico")) 
> {
142,148c119
< sub decmips {
<   local($sound_at) = @_;
< 
<   (($sound_at eq "calvin") ||
<    ($sound_at eq "hobbes") ||
<    ($sound_at eq "blondie") ||
<    ($sound_at eq "dagwood"));
---
>    system("$rshcommand /projects/cslu/speech/work/bin/share/playonsun $adcfile -v$volume $ext");
150,155c121,130
< 
< sub alpha {
<   local($sound_at) = @_;
< 
<    (($sound_at eq "bart") ||
<     ($sound_at eq "lisa"));
---
> elsif (($sound_at eq "calvin") ||
>        ($sound_at eq "hobbes") ||
>        ($sound_at eq "blondie") ||
>        ($sound_at eq "bart") ||
>        ($sound_at eq "lisa") ||
>        ($sound_at eq "dagwood"))
> {
>    system("/projects/cslu/speech/new/bin/decmips/wav2mu $adcfile /usr/tmp/$$.mu");
>    system("/projects/cslu/speech/bin/decmips/aplay -g $volume /usr/tmp/$$.mu");
>    system("/bin/rm -f /usr/tmp/$$.mu");
156a132,139
> elsif (($sound_at =~ /xebra.*/) ||
>        ($sound_at =~ /xpect.*/))
> {
>    $arch = `arch`;
>    chop $arch;
>    if($arch eq "sun4") {
>      system("/projects/cslu/speech/unsup/bin/sun4/auctl set device 2 gain = 2");
>      system("/ogi/staff/fanty/src/speech2snd/speech2snd $adcfile | /projects/cslu/speech/unsup/bin/sun4/auplay -v 100");
158,170c141,148
< 
< sub macintosh {
<   local($sound_at) = @_;
< 
<   (($sound_at =~ /stanley.*/) ||
<    ($sound_at =~ /oliver.*/)  ||
<    ($sound_at =~ /jake.*/)    ||
<    ($sound_at =~ /elwood.*/)  ||
<    ($sound_at =~ /gracie.*/)  ||
<    ($sound_at =~ /lily.*/)    ||
<    ($sound_at =~ /butch.*/)    ||
<    ($sound_at =~ /sundance.*/)    ||
<    ($sound_at =~ /charlie.*/));
---
>    }
>    elsif ($arch eq "decmips") {
>      system("/projects/cslu/speech/unsup/bin/decmips/auctl set device 2 gain = 2");
>      system("/projects/cslu/speech/unsup/bin/decmips/speech2snd $adcfile | /projects/cslu/speech/unsup/bin/decmips/auplay -v 100");
>    }	
>    else {
>      print "Can't play from a decmips arch on this terminal\n";
>    }
171a150,153
> else {
>   print "Error: Unrecognized machine to play at ($sound_at).\n";
>   exit(-1);
> }
174,175d155
< sub xterm {
<   local($sound_at) = @_;
177,180d156
<   (($sound_at =~ /xebra.*/) ||
<    ($sound_at =~ /xpose.*/) ||
<    ($sound_at =~ /xpect.*/));
< }
182,186d157
< 
< sub create_adcfile {
<   $adcfile = "/usr/tmp/$$.adcfile";
<   system("cat > $adcfile");
< }
