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

Re: [Emacspeak] Some auditory icon related bugs/issues



A correction on my earlier post.

I can now see where the files in the prompts directory are loaded into the cache so now not sure what is going on. WIll dig deeper.

On Wed, 24 Apr 2024 at 12:25, Tim Cross <theophilusx@xxxxxxxxx> wrote:

OK, I have tracked down both issues.

1. nil ems--play-args. The problem here is with the defcustom. If you select SoX, it sets the path to the hard coded value /usr/bin/play. However, sox-play is set based on a search for the play program. Yesterday, while tracking down issues, I did a sym link from /usr/bin/play to /usr/local/bin/play. As a result, when running the below custom definition and setting it to sox, the cond to set ems--play-args fails to match because emacspeak-play-program is /usr/bin/play and sox-play is /usr/local/bin/play.

As it stands now, the defcustom will not work for anyone who chooses SoX, but there SoX play program is not in /usr/bin. This could be a problem fo anyone who builds from source (where the default will likely be to install into /usr/local/bin) and possibly an issue for other platforms,  like mac and installing SoX via homebrew, where it could be in /usr/local/bin or it could be in a homebrew specific directory that is added to the path. Probably need to change the defcustom to not use the const choice menu and instead allow user to enter a path and have it default to what sox-play is.

2. Failure to play emacspeak.ogg icon. I think your on the wrong track here. It isn't an issue with loading the samples. The problem is with emacspeak-sounds-resource and the emacspeak-sounds-cache hashtable. There are two issues here -

a. emacspeak-sounds-resource returns 'button' if an icon is not found AND you are using pactl, but it will  return nil if your using SoX.

b. I cannot find anywhere in the code where the files in prompts directory are loaded into the emacspeak-soounds-cache hash table. This means that whenever you try to find an icon from one of these files, such as emacspeak.ogg, it won't be found.

The reason I was not hearing the emacsepeak.ogg file being played with the default pactl setup is because it is playing the default 'button' icon as emacspeak-sounds-resource did not find the 'emacspeak icon in the emacspeak-sounds-cache hashtable.  The same error occurs with Sox, but because emacspeak-sounds-resource does not have a defualt when using Sox, the error generates the more severe sringp nil error.

The fix would be to add a new function which is called when  emacspeak-sounds is loaded which add the ogg files in the prompts directory to the sounds cache hashtable.  May also want to add the ptompts directory to the emacspeak-sounds-cache-rebuild function, though this is probably not required as long as the files are added at least once as they don't change (unlike changing themes).




On Wed, 24 Apr 2024 at 10:09, Tim Cross <theophilusx@xxxxxxxxx> wrote:
Just pulled updates and tested. Unfortunately still not working.

- When I start with default settings i.e. using pactl and stored icon sounds I no longer hear the emacspeak.ogg startup icon at all.

- When I change the play program to sox, it does now set the correct path to /usr/bin/play, but it frails with the same wrong-type-argument stringp nil error. Looking at the backtrace, it also looks like the ems--play-args is not getting included in the call. The top of the stacktrace is

make-process(:name "Player" :buffer nil :command ("/usr/bin/play" nil nil))

Sorry it isn't a full backtrace, but the error breaks emacs such that you cannot integer any commands and have ot kill it from outside.




On Wed, 24 Apr 2024 at 00:56, T.V Raman <raman@xxxxxxxxxx> wrote:
Most of these were because things are now simpler with only ogg files.

1. emacspeak-speak-version is simpler it  just plays an icon
2. because vanilla bin/play handles .ogg, we can just use that
   (doesn't do mp3)
3. I still haven't chased down cases where we get a null icon after
   the above changes, let me know if that still happens.
--

--


--
regards,

Tim

--
Tim Cross



--
regards,

Tim

--
Tim Cross



--
regards,

Tim

--
Tim Cross



|Full archive May 1995 - present by Year|Search the archive|


If you have questions about this archive or had problems using it, please contact us.

Contact Info Page