⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.act

📁 ears-0.32, linux下有用的语音信号处理工具包
💻 ACT
字号:
From chaney@dans.comSun May 28 09:09:47 1995Date: Sat, 27 May 1995 07:28:14 -0400 (EDT)From: Dan Chaney <chaney@dans.com>To: ears-list@ms.uky.eduSubject: README for act.c[ Here is a program that parses the output of 'listen' and provides a  VERY rudimentary C-program to build and execute commands with 'listen'.  This code is fairly atrocious, but if I don't send it on to people on  the ears-list@ms.uky.edu soon, it will be of even less use.  -dan ]README file for act.c		5/95			chaney@dans.com  This is the README file, the sections are:	- What this is (and why)	- What it does, briefly	- Definitions (Because sometimes, I make no sense...)	- What to do to build the program: (This is what you're looking for)	- List of words to say (and the tokens they return)- What this is (and why)This program is designed to run with Ralf W. Stephan's <ralf@ark.franken.de>'listen' program from his ears package.  This program, 'act', parses theoutput of 'listen' and builds a sentence based on the output.  Thatsentence may be executed, corrected or dumped entirely.  This code is soyoung (and so bad :) I suspect it will be something to tinker with andthen say 'I could do that better if....'  Please update the rest of uswhen you do :-)Why?  Because I don't know c++ well and wanted a C program to tinkerwith in order to get the voice recognition to execution shell commands.- What it does (briefly)I found parsing is a much easier thing if you have the words printedby listen (I call them tokens) encased in brackets.  Single charactertokens such as letters, numbers and punctuation are more easily handled if they are marked as such, (ie [letter-0], [letter-1], [letter-~], etc.)As a word is spoken and recognized, the []-delimited token is printed by 'listen' and read by 'act'.  'Act' checks to see if the token has specialmeaning (see 'command tokens') and, if not, adds it into the sentence.Unless the token is marked as a letter (ie, letter-d], a space is addedinto the sentence between tokens.  (A space may be specically added, usingthe [space] token.  Spaces and dashes are important to the Unix commandline, so they are handled slightly differently.)So, given a set of []-delimited words, 'act' will build a string (evenallowing you to backspace verbally by saying 'wrong' or 'backspace'or even 'clear'.- Definitions (Because sometimes, I make no sense...)	Token - the string 'listen' prints out in response to a word.		'act' will ignore anything not in []'s	Sentence - the list of tokens printed from 'listen' to 'act'	Commands - tokens that 'act' performs on	- What to do to build the program: (This is what you've been looking for)	1. Set your default.words file to output the words within brackets.	   (Edit default.words, put the second word in brackets like [this])	2. Check the list of tokens below.  'Act' knows to watch for them	   and some (marked below) are special to 'act'.  Otherwise, the	   word is just added into the sentence (and may be executed).	3. Compile the program up (gcc act.c -o act) and run it (listen | act)- List of words to say (and the tokens they return)What you say:		listen's output           Comments-------------		---------------	    -----------------------edit 			[vi]		    Note, two words can have the samevi 			[vi]		    token if their meaning is the sameexit 			[quit]		 quit 			[quit]		 list 			[less]more 			[less]less 			[less]no 			[no]		 yes 			[yes]		 return 			[return]logout 			[logout]cdplayer 		[cdplayer]	Bad choice, play a CD, make more noiseplay 			[play]		My alias for cdplayerinfo 			[info]		Used with cdplayerstop 			[stop]		Used with 'cdplayer'volume 			[vol]		Adjusts speaker volumephone 			[phone]		Shell script to show phone's statusuptime 			[uptime]--------------- These are tokens with special meaning to 'act' ------------execute 		[execute]	Send current sentence to system() calldoit 			[execute]wrong 			[wrong]		Remove last token from sentencespace 			[space]		Add a space into the sentencedash 			[-]		Add a dash into the sentencebackspace 		[backspace]	Remove one space from sentenceclear 			[clear]		Clear current sentence (start over)show 			[show]		Show current sentenceabort 			[abort]		Exit 'listen' completelyrestart 		[restart]	Tries to restart 'listen | act' commandmute 			[mute]		Toggle whether words are added to                                         the sentence.computer 		[computer]	Check to see if program is running--------------- These are tokens that 'act' converts to commands -----------call 			[call]		Convert 'call' into 'cu -l /dev/ttyS2'xterm 			[xterm]		Convert 'xterm' into 'xterm &'Mosaic 			[Mosaic]	Convert 'call' into 'Mosaic &'--------------- These are single-character tokens for spelling and numbersslash 			[letter-/]dot 			[letter-.]tilde 			[letter-~]Zero 			[letter-0]		         One 			[letter-1]			 Two 			[letter-2]		         Three 			[letter-3]Four 			[letter-4]Five 			[letter-5]Six 			[letter-6]Seven 			[letter-7]Eight 			[letter-8]Nine 			[letter-9]alfa 			[letter-a]bravo 			[letter-b]charlie 		[letter-c]delta 			[letter-d]echo 			[letter-e]	bad choice since its a Unix commandfoxtrot 		[letter-f]golf 			[letter-g]hotel 			[letter-h]india 			[letter-i]juliet 			[letter-j]kilo 			[letter-k]lima 			[letter-l]mike 			[letter-m]november 		[letter-n]oscar 			[letter-o]papa 			[letter-p]quebec 			[letter-q]romeo 			[letter-r]sierra 			[letter-s]tango 			[letter-t]uniform 		[letter-u]victor 			[letter-v]whiskey 		[letter-w]x-ray 			[letter-x]yankee 			[letter-y]zulu 			[letter-z]comma 			[letter-,]Comments, suggestions and code updates welcome, chaney@dans.com-- -- Daniel Chaney        From home, work or play...       Fax: 606-253-2495   ---- 715 Patterson Office Tower, Lexington, KY 40526-0027       606-257-2150   ---- {uunet and the like}!ukma!chaney  chaney@ms.uky.edu  chaney@dans.com      ----     "I'll have time enough for sleep when I'm dead and in the ground"     --

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -