Cyberhorse Workshop
Google

How to customize Bellman's voice system

Overview

The voice system is composed of some voice files and a voice format file.

  1. Voice files
    The files may be any of mp3, wav or ogg. For naming files, there are two types:

    1. Numerical voices such as zero, one, two, three, ..., twenty, and so on, have to be named files as e00, e01, e02, e03, ..., e20 and so on. Here, the character 'e' is a prefix sign corresponding to English language. For other languages, the prefix sign is listed below:
      cz=Czech
      g=German
      s=Spanish
      f=French
      i=Italian
      r=Russian
      c=Chinese

      So, any way, to make a new customizing voice style, you have to select a language listed on Common option screen to

    2. Non-numerical voice can be named any words or characters sequence.

  2. Voice format file

    It is a text file. Its file extension must be ".brf". It can be saved in any folder on SD card. All external voice files referenced by the format file must be saved in the same folder.   

How to compose a Voice Format file

  1. The first line and all odd lines are voices sequence lines. The second line and all even lines are condition lines to be compared to determinate if their previous line, a voices sequence, may be selected to report time.
    Example:
        !TheTimeIs,H,!Oclock
        M = 0 & [ H < 20 | ( H % 10 ) = 0 ]
        !TheTimeIs,( H / 10 * 10 ),( H % 10 )!Oclock
        M = 0
     

  2. A voices sequence line is composed by file names of voice waves, H, f( H ), M, as well as f( M ) according to a sequence you want, separated by comma (Space character is not allowed).

    Example 1: !TheTimeIs,H,!Oclock
    Example 2: !TheTimeIs,H,( M / 10 * 10 ),( M % 10 )

    Note:

    • A file name must be leaded "!", e.g. "!ENowTime.wav" or "!ENowTime". A file extension may be omitted because it will be matched by program autommatically.

    • H is represented current time hour numbers. It is 24 hour format. It will be replaced with a name of voicing number wave file by program automatically depending on current hour number, e.g. "e08.wav" for English voice.

    • M is represented current time minute numbers. It will be replaced with a name of voicing number wave file by program automatically depending on current minute number. e.g. "e50.wav" for English voice.

    • Here f( H ) and f( M ) are represented formulas to get a number to voice. You have to replace it with a formula in the line.
      Example 1: ( M / 10 * 10 )
      Example 2: ( M % 10 )

      • A formula must be bracketed by "( " and " )". Note: there is a space character.

      • Only be H, M and constant number allowed for operands.

      • Only be +, -, *, / and %( modulus ) allowed for operators.

      • All operands and operators are seperated by a space character between each other.

    • A voice file name written in a format, include numerical voice file name produced by program depending on H, M, f(H) and f(M), is matched with file names firstly in the folder where the format file saved, then matched with built-in resources voice names (Please reference Built-in default format files). 

  3. A condition line is composed by one or multiple comparison expressions, each other connected with logic operators "&"( AND ) or "|"( OR ).
    Example 1: M = 0 & [ H < 20 | ( H % 10 ) = 0 ]
    Example 2: M = 0
    Note:

    • Only be "=", "<" and ">" allowed as comparison expression's operators.

    • Only be H, M, f( H ), f( M ) and constant number allowed as comparison expression's operands.

    • There is only one level "[ " and " ]" brackets allowed to use to change priority of logical combining among comparison expressions. Note: there is a space character along with brackets.

    • There is a space character between comparison expression and logic operator.

  4. The program matches conditions one by one from second line (that is the first condition line) to the last line until one successful. So, in fact, the last voices sequence line is unconditioned, that is say the last condition line must be canceled. It is replaced with "#" to announce the end of lines.

Download

1. Built-in default format files:

Czech voice format

German voice format

Spanish voice format

English voice format

French voice format

Italian voice format

Russian voice format

2. Examples of customized format:

  • First example: For English language, how to speaking time in 12-hour format with AM and PM.

    Note:

    • In this example, only AM and PM both are external voice files, all other voices are still referenced from built-in voices. 

    • The "epoint" is a file name of voice "o'clock".

  • Second example: It is changed from first example to delete "O'clock".

Copyright 2004~2012 Cyberhorse Workshop. All Rights Reserved