Sha256: 3eb9fa6319b7309c72c78464607a2030690184b3ced074619c4157c452f9aba0
Contents?: true
Size: 411 Bytes
Versions: 4
Compression:
Stored size: 411 Bytes
Contents
require 'open3' out, err, status = Open3.capture3("say -v '?' | grep US") #out, err, status = Open3.capture3("say -v '?'") out.split("\n").each do |line| name_lang, sentence = line.split("#") next unless m = name_lang.match(/(.+)\s+(\w+_\w+)/) name = m[1].sub!(/\s+$/,'') lang = m[2] printf("%s =%5s=%s\n", name,lang,sentence) sentence.gsub!("\'",'') system "say -v \'#{name}\' #{sentence}" end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
yuris_vocabuil-0.2.3 | lib/tmp.rb |
yuris_vocabuil-0.2.2 | lib/tmp.rb |
yuris_vocabuil-0.2.1 | lib/tmp.rb |
yuris_vocabuil-0.2.0 | lib/tmp.rb |