Sample media items

The following <mediaitem> element displays a text prompt:

<mediaitem mimetype="text/plain">
    Welcome to the SpeechRecorder Demo Script.
</mediaitem>

This <mediaitem> element shows a formatted text loaded from a file:

<mediaitem mimetype="text/rtf" 
           src="promptText.rtf" />

Note: RTF prompts only work on Windows operating systems.

This <mediaitem> element shows an image loaded from a relative (to the project directory) URL:

<mediaitem mimetype="image/jpeg" 
           src="images/FelixWas.jpg" 
           alt="Boy and washing machine" />

This <mediaitem> element shows an image loaded from a absolute URL:

<mediaitem mimetype="image/jpeg" 
           src="http://www.speechrecorder.org/prompts/images/FelixWas.jpg" 
           alt="Boy and washing machine" />

Formatted text prompts:

The following prompt should look almost the same as a plain text prompt:

 <mediaitem mimetype="text/x-prompt">
    <promptdoc>
        <body>
            <p>
                <text>Welcome to SpeechRecorder Demo Script.</text>
            </p>
        </body>
    </promptdoc>
</mediaitem>

An often requested feature was the possibility to force a new line in the prompt. This can now be achieved with the line break <br/> element:

<mediaitem mimetype="text/x-prompt">
    <promptdoc>
        <body>
            <p>
                <text>Welcome to SpeechRecorder Demo Script.</text>
            <br/>
                <text>How are you?</text>
            </p>
        </body>
    </promptdoc>
</mediaitem>

Often there is also the requirement to emphasize parts of the prompt text, in the following examples the word apple:

Underlined:

<mediaitem mimetype="text/x-prompt">
    <promptdoc>
        <body>
            <p>
                <text>She planted an </text>
                <text decoration="underline">apple</text>
                <text> tree in her garden.</text>
            </p>
        </body>
    </promptdoc>
</mediaitem>

Colored (green):

<mediaitem mimetype="text/x-prompt">
    <promptdoc>
        <body>
            <p>
                <text>She planted an </text>
                <text color="green">apple</text>
                <text> tree in her garden.</text>
            </p>
        </body>
    </promptdoc>
</mediaitem>

Use font settings:

Increase font size (by 150%):

<mediaitem mimetype="text/x-prompt">
    <promptdoc>
        <body>
            <p>
                <text>She planted an </text>
                <font size="150.0%">
                    <text>apple</text>
                </font>
                <text> tree in her garden.</text>
            </p>
        </body>
    </promptdoc>
</mediaitem>

Italic font:

<mediaitem mimetype="text/x-prompt">
    <promptdoc>
        <body>
            <p>
                <text>She planted an </text>
                <font style="italic">
                    <text>apple</text>
                </font>
                <text> tree in her garden.</text>
            </p>
        </body>
    </promptdoc>
</mediaitem>

Combine underline decoration, green text, font size 150% and italic style:

<mediaitem mimetype="text/x-prompt">
    <promptdoc>
        <body>
            <p>
                <text>She planted an </text>
                <font size="150%" style="italic">
                    <text color="green" decoration="underline">apple</text>
                </font>
                <text> tree in her garden.</text>
            </p>
        </body>
    </promptdoc>
</mediaitem>