Hi Tomas, all;

At this point in the conversation perhaps it would be useful to mention 
the existing ATK , AT-SPI, and gnome-speech API features which might be 
used to handle "automatic" language switching.

AtkDocument and AT-SPI's Document interface include a 'documentLocale' 
property, which can be used by AT clients to determine the 'default' 
locale of a document.  Similarly, AtkApplication has a locale property 
which applies to the application instance (and thus the user 
interface).  AtkApplication's locale is almost always known, via the 
POSIX locale setting.  However as Tomas notes below, for Document 
instances the user agent cannot always determine the document locale 
reliably.  If it can, then AtkDocument.getDocumentLocale should work fine.

For those rare instances where UI components are in a different locale 
or lang from their host application, AtkObject.getAttributes() can be 
used to return either a "lang" or "locale" attribute for that object; AT 
clients should probably begin to check for the presence of such attributes.

Within a document or textual element, AtkText provides text attribution 
and markup.  Individual ranges of text can be marked with a "lang" 
attribute/value pair; this allows, for instance, the use of embedded 
foreign language expressions or words, or the proper TTS output for 
dictionaries or other mixed-language texts.

I am not sure about what SpeechDispatcher provides in the way of 
language/locale capabilities for its various engines and voices, but 
gnome-speech has API which associates a voice with one or more locales 
for which it was designed.  An AT client can query a gnome-speech 
service for voices matching a particular locale.   VoiceXML/JSSAPI 
provide additional client APIs which may be useful for passing marked-up 
text to a TTS service; such text could include embedded language markup.

Best regards

Bill

Tomas Cerha wrote:
> juan rafael fernández wrote:
>   
>> The scenario:
>> ---------------
>> A teacher of languages wants TTS in English, Spanish, German, French
>> and Italian. Uses Spanish UTF-8 locale.
>>     
>
> I believe that such user requirement makes much sense even if you are
> not a language teacher.  Many people read and write emails, documents or
> browse the web in more than just one language.
>
> As you noted, this is not a problem to use multiple speech engines on
> one system and speech APIs, such as Speech Dispatcher support switching
> languages on the fly.
>
> The question is, however, how to use this functionality within the user
> interface programs, such as screen readers, since most of the time we
> don't have the information about the language of the text we are working on.
>
> We must distinguish two distinct areas:
>   * User Interface (texts provided by the software in use)
>   * The document (or more generally any textual data we work with)
>
> The situation is usually quite good with the user interface.  The
> language may be determined from the current locale and a properly
> localized system will have all the user interface in just one language.
>  Deviations to this rule exist, but I think it is reasonable to consider
> them marginal.
>
> Still the best situation in the area of documents is with web documents.
>  The language may (and should) be specified in document headers.  We can
> also determine the language of each piece of text within the page, which
> is good for multi-lingual documents.
>
> The situations with e-mails is notably worse.  As far as I know, there
> no language header widely used by current user agents.
>
> I also can't find a way to set a language for a document in
> OpenOffice.org, but this may be just my fault.
>
> I believe that the solution to this would be to:
>    1. Use the language information wherever possible
>    2. Provide a mechanism to switch the language manually
>
> Well, this was all just a theory.  I don't know how is this problem
> addresed by screen reader developers, so I would like to join the
> question.  What is the current situation and what is the plan?
>
> I am especially interested if Orca currently performs any kind of
> language switching and if there is anything I can do to support it in
> the Speech Dispatcher backend.
>
> Any comments to this are greatly appreciated!
>
> Best regards, Tomas
>
>
>
>
>
>
>
> _______________________________________________
> gnome-accessibility-list mailing list
> gnome-accessibility-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gnome-accessibility-list
>   

_______________________________________________
gnome-accessibility-list mailing list
gnome-accessibility-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-accessibility-list

Reply via email to