網路上的window.speechSynthesis教學主要都只有說切換指定語言
像是這樣就能切換成中文語音:
const synth = window.speechSynthesis;
const speak = (msg) => {| <?php | |
| /** | |
| *============================ | |
| * author:Farmer | |
| * time:2017/12/19 | |
| * blog:blog.icodef.com | |
| * function:加密方式 | |
| *============================ | |
| */ |
You can check here for getting the latest version. Change the wget url to download newer versions.
| <?php | |
| # install symfony/var-dump to your project | |
| # composer require symfony/var-dumper | |
| // use namespace | |
| use Symfony\Component\VarDumper\Cloner\VarCloner; | |
| use Symfony\Component\VarDumper\Dumper\CliDumper; | |
| use Symfony\Component\VarDumper\Dumper\HtmlDumper as SymfonyHtmlDumper; |
| #coding=utf8 | |
| import itchat | |
| # tuling plugin can be get here: | |
| # https://github.com/littlecodersh/EasierLife/tree/master/Plugins/Tuling | |
| from tuling import get_response | |
| @itchat.msg_register('Text') | |
| def text_reply(msg): | |
| if u'作者' in msg['Text'] or u'主人' in msg['Text']: | |
| return u'你可以在这里了解他:https://github.com/littlecodersh' |
| # See https://codeship.com/documentation/docker/browser-testing/ | |
| FROM myapp:base | |
| # We need wget to set up the PPA and xvfb to have a virtual screen and unzip to install the Chromedriver | |
| RUN apt-get install -y wget xvfb unzip | |
| # Set up the Chrome PPA | |
| RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - | |
| RUN echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list |
| package main | |
| import ( | |
| "net/http" | |
| "os" | |
| "bytes" | |
| "path" | |
| "path/filepath" | |
| "mime/multipart" | |
| "io" |
| Intent intent = new Intent(Intent.ACTION_VIEW); | |
| ComponentName cn = new ComponentName("com.tencent.mm", "com.tencent.mm.plugin.base.stub.WXCustomSchemeEntryActivity"); | |
| intent.setData(Uri.parse("weixin://dl/moments")); | |
| intent.setFlags(Intent.FLAG_ACTIVITY_PREVIOUS_IS_TOP); | |
| intent.setComponent(cn); | |
| startActivity(intent); |
| function ksort(obj){ | |
| var keys = Object.keys(obj).sort() | |
| , sortedObj = {}; | |
| for(var i in keys) { | |
| sortedObj[keys[i]] = obj[keys[i]]; | |
| } | |
| return sortedObj; | |
| } |