"; $list = array(); print implode(" ",array_keys($phs)); print "
"; $call = strtolower($call); while(strlen($call)) { $two = substr($call,0,2); $eat = 0; if($phs[$two]) { //print "Two: $two"; $list[] = $two; $eat = 2; } else { $one = substr($call,0,1); if($phs[$one]) { //print "One: $one"; $eat = 1; $list[] = $one; } else if($phs[$one . $one]) { $eat = 1; //print "Double: $one$one"; $list[] = $one.$one; } } if($one == '.') { $eat = 1; } if(!$eat) { print "
No match for $one or $two
"; $eat = 1; } if($eat) { $now = substr($call,$eat); //print "
Eat $eat, now: $now
"; $call = $now; } } $clist = 'sound'; foreach($list as $item) { $clist .= " voice/phoneme/$item.aiff"; } chdir($base_dir); system("python boomsg.py $clist"); print "sent list: $clist"; exit; } if(@$_GET['t'] == 'effects') { print "sounds effects"; $me .= "?t=effects"; $chunks = array_chunk($effect,ceil(count($effect)/6),true); print ""; foreach($chunks as $effectchunk) { print ""; } print "
"; foreach($effectchunk as $k=>$v_1) { print "

$k

\n"; foreach($v_1 as $v=>$one) { print "$v
\n"; } } print "
"; } else { print "sounds effects"; $me .= "?t=snds"; $sound_chunks = array_chunk($sounds,ceil(count($sounds)/8),true); print ""; foreach($sound_chunks as $chunk) { print ""; } print "
"; foreach($chunk as $context=>$snds) { print "

$context

\n"; foreach($snds as $snd=>$one) { print "$snd
\n"; } } print "
"; } print ""; ?>