Voice Application Development for Android
上QQ阅读APP看书,第一时间看更新

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "The following lines of code create a TextToSpeech object that implements the onInit method of the onInitListener interface."

A block of code is set as follows:

TextToSpeech tts = new TextToSpeech(this, new OnInitListener(){ 
    public void onInit(int status){ 
       if (status == TextToSpeech.SUCCESS) 
             speak("Hello world", TextToSpeech.QUEUE_ADD, null); 
    }
}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

Interpret field i:
       Play prompt of field i
       Listen for ASR result
       Process ASR result:
               If the recognition was successful, then save recognized
               keyword as value for the field i and move to the next field
               If there was a no match or no input, then interpret field i
               If there is any other error, then stop interpreting
Move to the next field:
       If the next field has already a value assigned, then move to the next one
       If the last field in the form is reached,thenendOfDialogue=true

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Please say a word of the album title."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.