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

[Emacspeak] Use emacspeak-sox instead of emacspeak-m-player-program in emacspeak-sounds.el



Hi, in emacspeak-sounds.el you are using mplayer to play mp3 files.
I understand the reason, you are setting audio players like aplay
which don't support mp3, but now that mpv is been used more, and
mpv syntax an features are becoming more and more incompatible with
mplayer, wouldn't it be better to use sox and at least remove
mplayer dependency from this file?

I still think that it whould be better to use sox as default player,
code could be simplified and you wouln't have to worry about changing
audio formats.

Have you encountered problems (latency, &c) using sox?

I'm going to submit some patches to pkgsrc, I would like to know
your opinion.

PS. With "you" an "your" I'm reffering to _all_ of the contributors
of this project, of course!

Regards.
adr

This is a diff from the last release.
=======================================
diff -u /tmp/emacspeak-sounds.el.orig /tmp/emacspeak-sounds.el
--- /tmp/emacspeak-sounds.el.orig	2024-03-19 07:46:10.498854044 +0000
+++ /tmp/emacspeak-sounds.el	2024-03-19 07:45:51.223412655 +0000
@@ -309,15 +309,15 @@

 (defun emacspeak-prompt (name)
   "Play  prompt for specified name."
-  (cl-declare (special emacspeak-prompts-directory emacspeak-m-player-program))
+  (cl-declare (special emacspeak-prompts-directory emacspeak-sox))
   (let  ((file (expand-file-name (format "%s.mp3" name)
                                  emacspeak-prompts-directory)))
     (cl-assert (file-exists-p file) t  "File does not exist")
-    (when emacspeak-m-player-program
+    (when emacspeak-sox
       (with-environment-variables
           (("PULSE_SINK"))
         (call-process
-         emacspeak-m-player-program nil  0 nil file)))))
+         emacspeak-sox nil  0 nil file "-d")))))

 (provide  'emacspeak-sounds)
 ;;;   emacs local variables



|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