[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Search]

Re: Changing pronunciations and saving them.



Hello Kalyan,

Kalyan Mukherjea <kalyan.infinity@xxxxxxxxxxx> writes:

> i have been trying to change pronunciation of a few proper names and
> technical terms and getting nowhere.

The first thing you should probably do is to add these lines to your
.emacs file:

(add-hook 'emacspeak-startup-hook
  (function (lambda ()
      (emacspeak-pronounce-load-dictionaries 
        "~/.emacspeak/.dictionary"))))

> C-h a pronunciation
>
> made me aware of the command:
>
> emacspeak-pronounce-define-pronunciation.

Instead, use the following command:

 control e meta d runs the command emacspeak-pronounce-dispatch which is
   an interactive compiled Lisp function in `emacspeak-pronounce'.
   (emacspeak-pronounce-dispatch)

Provides the user interface front-end to Emacspeak's pronunciation
dictionaries.

This is the preferred way, I think.

> So I tried this out, with limited success:
>
> It seems the changes can be applied to a directory, a file or a mode
> and one cannot  select `global'. 

I asked about this earlier.  Look for it in the archive to see the
rationale.  It was mentioned then, and IIRC several days ago as well, a
global definitions functionality present in the viavoice itself.

> Fine, but to change pronunciation for LaTeX mode, I had to open a
> LaTeX file first. 

I think it is assumed that one will change the definitions as one comes
across them.

> The documentation provided by appropos suggested that I first load
> persistent dictionaries. My ~/.emacspeak directory has only a
> clipboard file, no dicts!  Nevertheless, I tried changing
> interactively and instructed `Bhatia' to be pronounced `Bhatya' rather
> than `Bhashiaa' and when I pressed RET I was asked if pre-existing
> dictionaries should be loaded first or not. Pressing `y' gave the
> following error message: emacspeak-pronounce-load-dictionaries: Wrong
> type argument: stringp, nil

Not sure about this.  I know what the error means, but not why.  I have
not heard this error before, so it might be sorted by the code at the
top of this mail.  It could be that, when trying to load the persistent
dictionary, ~/.emacspeak/.dictionary by default, it was passing the name
of the file as an argument, which has no value, and therefore fails.

> Pressing `n' did change the pronunciation; but if I closed the file or
> opened another LaTeX file the old, incorrect rendering was
> restored. Whaat am I doing wrong?

I am guessing that the definition was not saved in the persistent
dictionary.  It was probably "saved" buffer-local, and therefore the
definition did not exist outside of the original buffer.

I hope this helps,

rdc

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Robert D. Crawford                                      rdc1x@xxxxxxxxxxx





-----------------------------------------------------------------------------
To unsubscribe from the emacspeak list or change your address on the
emacspeak list send mail to "emacspeak-request@xxxxxxxxxxx" with a
subject of "unsubscribe" or "help"


Emacspeak Files | Subscribe | Unsubscribe | Search