branch: externals/greader
commit 772ee0da0b1f9ba87c6bdff378d1d2471de2fa88
Author: Michelangelo Rodriguez <michelangelo.rodrig...@gmail.com>
Commit: Michelangelo Rodriguez <michelangelo.rodrig...@gmail.com>

    greader version 0.11.5
    
    Customization option `greader-audiobook-include-track-name-in-audio'
    added: This option allow us to have the title of the current track
    spoken at the start.
    
    Customization option `greader-audiobook-pause-at-end-of-track' added:
    This option allow us to specify that we want an artificial pause at
    end of  the current track maybe because owr reader is buggy, and jumps
    if the track currently playing does'nt have a final pause.
    You can also customize the variable `greader-audiobook-pause-string'
    to change the string that is used to generate the pause.
---
 greader-audiobook.el | 16 ++++++++++++++++
 greader.el           |  2 +-
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/greader-audiobook.el b/greader-audiobook.el
index 4ce4e58b36..fb1f019b95 100644
--- a/greader-audiobook.el
+++ b/greader-audiobook.el
@@ -146,6 +146,17 @@ In this way, you will have only the zipped file containing 
the book."
 Only the final report will be printed."
   :type '(boolean))
 
+(defcustom greader-audiobook-include-track-name-in-audio nil
+  "If t, audio track names will be included at start of each file."
+  :type '(boolean))
+(defcustom greader-audiobook-pause-at-end-of-track t
+  "Enable to add a pause at end of each block."
+  :type '(boolean))
+
+(defcustom greader-audiobook-pause-string "\n.\n.\n.\n.\n.\n"
+  "The string that will be used to generate the pause at end of sentence."
+  :type '(string))
+
 ;; functions
 
 (defun greader-audiobook--get-block ()
@@ -207,9 +218,14 @@ Return the generated file name, or nil if at end of the 
buffer."
        (text (when block (buffer-substring (car block) (cdr block)))))
     (if block
        (progn
+         (when greader-audiobook-include-track-name-in-audio
+           (setq text (concat (file-name-sans-extension filename)
+                              ".\n" text)))
          (setq text (greader-dehyphenate text))
          (when (or greader-dict-mode greader-dict-toggle-filters)
            (setq text (greader-dict-check-and-replace text)))
+         (when greader-audiobook-pause-at-end-of-track
+           (setq text (concat text greader-audiobook-pause-string)))
          (setq output (call-process command nil "*espeak-output*" nil
                                     rate language
                                     wave-file text))
diff --git a/greader.el b/greader.el
index 82f4c1f6a7..dfcc428246 100644
--- a/greader.el
+++ b/greader.el
@@ -8,7 +8,7 @@
 ;; URL: https://gitlab.com/michelangelo-rodriguez/greader
 
 ;; package-requires: ((google-translate))
-;; Version: 0.11.4
+;; Version: 0.11.5
 
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by

Reply via email to