Skip to Content.
Sympa Menu

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

Subject: Emacspeak discussion list

List archive

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


Chronological Thread 
  • From: adr <adr AT sdf.org>
  • To: emacspeak AT emacspeak.net
  • Subject: [Emacspeak] Use emacspeak-sox instead of emacspeak-m-player-program in emacspeak-sounds.el
  • Date: Tue, 19 Mar 2024 07:51:01 +0000 (UTC)

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




Archive powered by MHonArc 2.6.19+.

Top of Page