Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2087973
  • 博文数量: 414
  • 博客积分: 10312
  • 博客等级: 上将
  • 技术积分: 4921
  • 用 户 组: 普通用户
  • 注册时间: 2007-10-31 01:49
文章分类

全部博文(414)

文章存档

2011年(1)

2010年(29)

2009年(82)

2008年(301)

2007年(1)

分类: C/C++

2008-03-12 00:10:24

tchars

The tchars instruction speaks phrases from a variable name.

Synopsis

tchars(ctype.src{ [, 'inflection'],[type.style]})

Description

The tchars instruction puts the null terminated string of alphanumeric characters that are identified by the first argument into a queue for speaking. The second argument, when specified, controls the speech inflection. The three inflection parameters are r (rising), f (falling), and t (total). Total produces both a rising inflection on the first phrase and a falling inflection on the last phrase if there is more than one. It produces a falling inflection if there is only one phrase. It is important to note that r, f, and t work only if those types of phrases are in the talkfile.

The optional type.style argument specifies the coding style.

The tchars instruction speaks one character at a time, unlike the tnum instruction, which speaks the digits as one number. For example, the tchars instruction would speak the number 61 as "six-one" while the tnum instruction would speak "sixty-one." Also, tchars speaks the string 61A as "six-one-A."

Example

In the following example, the script asks the caller to enter his or her ID number. The script waits for three touch tones, which it stores in ch.ID. The script then repeats what the caller entered, reading the value in ch.ID.

talk("Please enter your ID number")
getinput(ch.ID,3)
talk("Your ID
number is")
tchars(ch.ID)

tflush()

阅读(1366) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~