Speaking currency values

The supplied voice segments for each locale include one set of four voice segments for currency names, as shown in Table 1. Because locale includes country or region as well as language, these names are the names of the main local currency. Normally, the AudioCurrency object speaks the currency names for this currency. For example, if the locale is en_US, the value 2.25 is spoken as “two dollars and twenty-five cents”.

Table 1. Currency voice segments for XYZ currency

Voice segments for XYZ currency

Example

XYZ_majorcur (major currency name, singular)

“dollar”

XYZ_majorcurs (major currency name, plural)

“dollars”

XYZ_minorcur (minor currency name, singular)

“cent”

XYZ_minorcurs (minor currency name, plural)

“cents”

Using the currency property of the AudioCurrency object

The currency property of the AudioCurrency object allows you to speak a value as an amount in a currency that isn’t the local currency. For example, you might want to talk about British currency in France, or you might want to talk about Euros anywhere in Europe. Table 2 shows an example of this, and Table 3 shows what voice segments you would need.

Speaking euro amounts

In the following locales, currency amounts are spoken in euros and cents by default: French, Castilian Spanish, Catalan, German and Italian. To revert to the old national currency, specify PREEURO in the variant part of the locale property. Alternatively, you can specify dtj.preeuro.support=true in the dtj.ini file to achieve the same result. To speak a numeric value as a euro amount in a locale which doesn't default to euro, you need to:

  1. Record major and minor currency names (“euro” “euros”, “cent”, and “cents”) in the languages in which you intend to speak euro amounts (for example, you might want them pronounced differently in French, English, and so on). The names must be prefixed with the characters “EUR”, for example, EUR_majorcur, EUR_majorcurs, EUR_minorcur, EUR_minorcurs.
  2. Before you can import the voice segments that you have recorded, you need to create your own control file, an example of which is shown in Figure 1.
  3. Import the voice segments that you have recorded using the following command:
    dtjplex -action importVoiceAll -controlfile <path>\impexpeuro.cfv
  4. Specify EUR in the currency property of the AudioCurrency object.
Table 2. A value of 20000000 spoken with different currency and locale property values

locale

GBP currency

FRF currency

EUR currency

en_GB

“twenty million pounds”

“twenty million francs”

“twenty million euros”

fr_FR

“vingt millions de livres sterling”

“vingt millions francs”

“vingt millions euros”

Table 3. Voice segments required

locale

Voice segments required

en_GB

GBP_majorcur

FRF_majorcur

EUR_majorcur

 

GBP_majorcurs

FRF_majorcurs

EUR_majorcurs

 

GBP_minorcur

FRF_minorcur

EUR_minorcur

 

GBP_minorcurs

FRF_minorcurs

EUR_minorcurs

fr_FR

GBP_majorcur

FRF_majorcur

EUR_majorcur

 

GBP_majorcurs

FRF_majorcurs

EUR_majorcurs

 

GBP_minorcur

FRF_minorcur

EUR_minorcur

 

GBP_minorcurs

FRF_minorcurs

EUR_minorcurs

Figure 1. Example of a control file
character_encoding = Cp1252
#export :
segment_locale = fr_FR
export_type = raw
#import :
import_hints = Q0S0
file_encoding = wav
segment_name = EUR_majorcur
segment_category = System
file_name = euro.wav
;
segment_name = EUR_majorcurs
segment_category = System
file_name = euros.wav
;
segment_name = EUR_minorcur
segment_category = System
file_name = cent.wav
;
segment_name = EUR_minorcurs
segment_category = System
file_name = cents.wav
;