Delphi-Kylix
  Home arrow Delphi-Kylix arrow Page 3 - Delphi and Microsoft Agent
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
DELPHI-KYLIX

Delphi and Microsoft Agent
By: Leidago
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 5
    2006-11-01

    Table of Contents:
  • Delphi and Microsoft Agent
  • Using the Agent in Delphi
  • Modifying speech out
  • Other features of the Agent

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Delphi and Microsoft Agent - Modifying speech out


    (Page 3 of 4 )

    In the previous section we used the Speak() procedure to make Merlin read the text in the memo. We can use that method to modify speech by using tags. These  tags can be used to change the output expression of the character. Speech tags follow a very specific format:

    1. All tags begin and end with a backslash character ().
    2. Tags are white space dependent i.e Merlin is not the same as Merlin .
    3. The single backslash character is not enabled within a tag. To include a backslash character in a text parameter of a tag, use a double backslash.
    4. Tags are case insensitive, i.e Merlin is the same as MERLIN.

    From the Microsoft documentation there are eleven main tags that can be used to alter speech output. Below are some of them as laid out in the Microsoft Documentation:

    Chr

    Description: Sets the character of the voice.

    Syntax: Chr=string

    String: A string specifying the character of the voice.

    Part

    Description

    "Normal" (default)

    A normal tone of voice

    "Monotone"

    A monotone voice

    "Whisper"

    A whispered voice

    Ctx Tag

    Description: Sets the context of the output text.

    Syntax: Ctx=string

    String: A string specifying the context of the text that follows, which determines how symbols or abbreviations are spoken.

    Part

    Description

    "Address"

    Addresses and/or phone numbers.

    "E-mail"

     Electronic mail.

     "Unknown" (default)

     Context is unknown.

     

    Lst Tag

    Description: Repeats last spoken statement for the character.

    Syntax: Lst

    Remarks: This tag enables a character to repeat its last spoken statement. This tag must appear by itself in the Speak method; no other text or parameters can be included. When the spoken text is repeated, any other tags included in the original text are repeated, except for bookmarks. Any .WAV and .LWV files included in the text are also repeated.

    Map Tag

    Description: Maps spoken text to text displayed in the word balloon.

    Syntax: Map="spokentext"="balloontext"

    Remarks: This tag enables you to use different spoken text than that displayed in the word balloon.

    Part

    Description

    spokentext

    A string specifying the text for spoken output.

    balloontext

    A string specifying the text for word balloon output.

    Mrk Tag

    Description: Defines a bookmark in the spoken text.

    Syntax: Mrk=number

    Remarks: When the server processes a bookmark, it generates a bookmark event. You must specify a number greater than zero (0) and not equal to 2147483647 or 2147483646.

    Part

    Description

    number

    A Long integer value that identifies the bookmark.

    Pau Tag

    Description: Pauses speech for the specified number of milliseconds.

    Syntax: Pau=number

    Part

    Description

    number

    The number of milliseconds to pause.

    Pit Tag

    Description: Sets the baseline pitch of the output to the specified value in hertz.

    Syntax: Pit=number

    Remarks: This tag is supported only for TTS-generated output. The range of values for the parameter may vary depending on the installed TTS engine.

    Part

    Description

    number

    The pitch in hertz. 

    There are a couple more that you can use to make your agent speak in a way that you like. To make Merlin whisper the text that he reads off the memo, change the code in the button1 procedure from this:

    procedure TForm1.Button1Click(Sender: TObject);
    begin
    Merlin.show(false);
    Merlin.speak(memo1.text, '');
    end;

    To this:

    procedure TForm1.Button1Click(Sender: TObject);
    begin
    Merlin.show(false);
    Merlin.speak(Chr="Whisper"memo1.text, '');
    end;

    More Delphi-Kylix Articles
    More By Leidago


       · This is a very exciting and new technology that i think will take off like a storm!...
       · this is a good artical..but how i can change the output device or can i recode...
     

    DELPHI-KYLIX ARTICLES

    - Loading an XML Document into the DOM
    - Delphi Wrapper Classes and XML
    - Delphi and the DOM
    - Delphi and XML
    - Internet Access: Client Service
    - Finishing the Client for an Internet Access ...
    - The Client for an Internet Access Control Ap...
    - User Management for an Internet Access Contr...
    - Important Procedures for an Internet Access ...
    - Server Code for an Internet Access Control A...
    - Constructing the Interface for an Internet A...
    - Building a Server Application for an Interne...
    - Building an Internet Access Control Applicat...
    - Client Dataset: Working with Data Packets an...
    - Using the Client Dataset in an N-Tiered Appl...







    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek