Skip to content

Instantly share code, notes, and snippets.

@ebith
Created March 18, 2016 11:32
Show Gist options
  • Save ebith/edfa5c255dc9af9ab9b5 to your computer and use it in GitHub Desktop.
Save ebith/edfa5c255dc9af9ab9b5 to your computer and use it in GitHub Desktop.
発言を読み上げるLimeChat用スクリプト
// Require:
// SpeechPlatformRuntime.msi - https://www.microsoft.com/en-us/download/details.aspx?id=27225
// MSSpeech_TTS_ja-JP_Haruka.msi - https://www.microsoft.com/en-us/download/details.aspx?id=27224
var tts;
function event::onLoad() {
tts = new ActiveXObject('Speech.SpVoice');
}
function event::onChannelText(prefix, channel, text) {
if (prefix.nick == myNick) { return; }
text = text.replace(/(h?ttp|ftp)s?:\/\/\S+/g, 'URL省略');
tts.Speak(text, 1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment