網路上的window.speechSynthesis教學主要都只有說切換指定語言
像是這樣就能切換成中文語音:
const synth = window.speechSynthesis;
const speak = (msg) => {Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| cd $HOME | |
| FileName='go1.11.1.linux-armv6l.tar.gz' | |
| wget https://dl.google.com/go/$FileName | |
| sudo tar -C /usr/local -xvf $FileName | |
| cat >> ~/.bashrc << 'EOF' | |
| export GOPATH=$HOME/go | |
| export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin | |
| EOF | |
| source ~/.bashrc |
| # coding:utf-8 | |
| from kivy.app import App | |
| from kivy.uix.image import Image | |
| from kivy.clock import Clock | |
| from kivy.graphics.texture import Texture | |
| import cv2 | |
| class KivyCamera(Image): | |
| def __init__(self, capture, fps, **kwargs): |