3

I changed chronos-text-to-speech-notify acording to https://github.com/dxknight/chronos/issues/2.

My Chronos config includes this:

(setq chronos-text-to-speech-program-parameters "-s 50 -k 1 -a 50 -v mb/mb-fr1" ).

The command

(chronos-add-timer "0:0:1" "Coucou, je parle français" nil)

is supposed to speak the message with a French voice, but it doesn't (default English voice only)

Chronos sent this shell command:

espeak \"-s 50 -k 1 -a 50 -v mb/mb-fr1\" \"20:44 Coucou, je parle français\"

which returned

Failed to read voice 'mb/mb-fr1"'

This shell command works fine, however:

espeak -s 50 -k 1 -a 50 -v mb/mb-fr1 "20:44 Coucou, je parle français"

This sounds like a bug, but I haven't succeeded in fixing it.

  • Maybe give a link for, and a short description of, Chronos? – Drew Nov 7 at 22:27
  • What is the question? So far, this risks being closed as unclear. Please pose an explicit question. Thx. – Drew Nov 7 at 22:29
  • 1
    I'm not sure what the fix is, but I suspect there's a difference between espeak "-arg1 -arg2" "some text here" and espeak -arg1 -arg2 "some text here". In my first example, -arg1 -arg2 is in quotes; the second one isn't. – zck Nov 7 at 23:26
  • @Drew Chronos provides multiple countdown / countup timers, shown sorted by expiry time in a special buffer chronos. Homepage: github.com/dxknight/chronos. – gigiair Nov 8 at 5:33
  • @Drew The question is to correct chronos-text-to-speech-notify so that he speaks French. I think we need to review chronos - shell-command to send a functional command – gigiair Nov 8 at 5:46
2

Following a look at chronos.el

(setq chronos-text-to-speech-program-parameters 
      "-s 50 -k 1 -a 50 -v mb/mb-fr1")

should probably be:

(setq chronos-text-to-speech-program-parameters
      '("-s" "50" "-k" "1" "-a" "50" "-v" "mb/mb-fr1"))

It looks buggy in that it's not passing the arguments through shell-quote-argument, although it's unclear if there's actually any reason to be using start-process-shell-command (as opposed to start-process). Either way I suspect there are improvements which could be made upstream.

  • thats do not make any change – gigiair Nov 8 at 5:27
  • It absolutely makes a difference to the shell command which is called. If you're not seeing the difference in the quoting, then you've not tested correctly. If you do see the difference in the command, yet the outcome is the same, then my assumption about the cause of the problem was incorrect. – phils Nov 8 at 5:36
  • The command I see using my suggested change matches the format you've shown after the "This shell command works fine, however" part of the question. – phils Nov 8 at 5:40
  • 1
    Ok, whith your suggestion, chronos speak french. sorry for the noise – gigiair Nov 8 at 9:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.