From 2172d29f08c83f6a2687d49b2aef0292c04e1ba1 Mon Sep 17 00:00:00 2001 From: happysmile <812024380@qq.com> Date: Wed, 8 Feb 2023 12:17:36 +0800 Subject: [PATCH] add mac specify commit --- lua/Trans/init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/Trans/init.lua b/lua/Trans/init.lua index 16006a5..ed77c45 100644 --- a/lua/Trans/init.lua +++ b/lua/Trans/init.lua @@ -34,6 +34,9 @@ end string.play = fn.has('linux') == 1 and function(self) local cmd = ([[echo "%s" | festival --tts]]):format(self) fn.jobstart(cmd) +end or fn.has('mac') == 1 and function (self) + local cmd = ([[say "%s"]]):format(self) + fn.jobstart(cmd) end or function(self) local seperator = fn.has('unix') and '/' or '\\' local file = debug.getinfo(1, "S").source:sub(2):match('(.*)lua') .. seperator .. 'tts' .. seperator .. 'say.js'