From 746d64040956017457d38f0bf59649e96d0ab449 Mon Sep 17 00:00:00 2001 From: Joseph Nuthalapati Date: Wed, 5 Jan 2022 18:52:39 +0530 Subject: [PATCH] ebook-to-audio-book: Get the correct default voice --- ebook-to-audio-book | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ebook-to-audio-book b/ebook-to-audio-book index ec12e96..ce2fe4b 100755 --- a/ebook-to-audio-book +++ b/ebook-to-audio-book @@ -2,15 +2,18 @@ ; -*- mode: clojure -*- ; A utility to listen to your ebooks using TTS programs +; +; This utility only works on macOS for now. (require '[clojure.java.io :as io] '[clojure.string :refer [split]] '[lib :refer [run-cmd extract-file-from-zip unixify]]) ;; TODO Check if all required utilities are installed - ;; TODO Allow voice selection -(println "Selected voice is Samantha") + +(let [default-voice (run-cmd ["defaults" "read" "com.apple.speech.voice.prefs" "SelectedVoiceName"])] + (println (str "Will read using the default voice " default-voice))) ;; TODO Use festival-tts or say depending on OS -- 2.43.0