Skip to content

Commit

Permalink
Merge pull request #33 from Xiao-M0/v2
Browse files Browse the repository at this point in the history
fix: win separator
  • Loading branch information
JuanZoran committed Apr 24, 2023
2 parents 3faab73 + 0a1b6cf commit 156e033
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lua/Trans/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ local system =
uname == 'Linux' and (vim.fn.executable 'termux-api-start' == 1 and 'termux' or 'linux') or
error 'Unknown System, Please Report Issue'

local sep = system == 'win' and '\\' or '/'
local sep = system == 'win' and '\\\\' or '/'
---@class Trans
---@field style table @Style module
---@field cache table<string, TransData> @Cache for translated data object
Expand Down
1 change: 1 addition & 0 deletions plugin/Trans.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ local f =
system == 'termux' and 'termux-tts-speak %q' or
system == 'linux' and 'echo %q | festival --tts' or
'node' .. Trans.relative_path { 'tts', 'say.js' } .. ' %q'
-- 'python ' .. Trans.relative_path { 'pytts', 'say.py' } .. ' %q'
-- 'powershell -Command "Add-Type –AssemblyName System.Speech; (New-Object System.Speech.Synthesis.SpeechSynthesizer).Speak([Console]::In.ReadToEnd())" | Out-File -Encoding ASCII %q'
-- or 'node' .. Trans.relative_path { 'tts', 'say.js' } .. ' %q'
-- system == 'win' and 'powershell -Command "Add-Type –AssemblyName System.Speech; (New-Object System.Speech.Synthesis.SpeechSynthesizer).Speak([Console]::In.ReadToEnd())" | Out-File -Encoding ASCII %q'
Expand Down
7 changes: 7 additions & 0 deletions pytts/say.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import pyttsx3
import sys

a = pyttsx3.init()

a.say(sys.argv[1])
a.runAndWait()

0 comments on commit 156e033

Please sign in to comment.