【鼎革‧革鼎】︰ Raspbian Stretch 《六之 K.3-言語界面-3上 》

北宋‧范仲淹‧岳陽樓記

慶曆四年春,滕子京謫守巴陵郡。越明年,政通人和,百廢具興,乃重修岳陽樓,增其舊制,刻唐賢今人詩賦於其上;屬予作文以記之。

予觀夫巴陵勝狀,在洞庭一湖。銜遠山,吞長江,浩浩湯湯,橫無際涯;朝暉夕陰,氣象萬千;此則岳陽樓之大觀也,前人之述備矣。然則北通巫峽,南極瀟湘,遷客騷人,多會於此,覽物之情,得無異乎?

若夫霪雨霏霏,連月不開;陰風怒號,濁浪排空;日星隱耀,山岳潛形;商旅不行,檣傾楫摧;薄暮冥冥,虎嘯猿啼;登斯樓也,則有去國懷鄉,憂讒畏譏,滿目蕭然,感極而悲者矣!

至若春和景明,波瀾不驚,上下天光,一碧萬頃;沙鷗翔集,錦鱗游泳,岸芷汀蘭,郁郁青青。而或長煙一空,皓月千里,浮光躍金 ,靜影沈璧,漁歌互答,此樂何極!登斯樓也,則有心曠神怡,寵辱偕忘、把酒臨風,其喜洋洋者矣!

嗟夫!予嘗求古仁人之心,或異二者之為 ,何哉?不以物喜,不以己悲,居廟堂之高,則憂其民;處江湖之遠,則憂其君。是進亦憂,退亦憂;然則何時而樂耶?其必曰:「先天下之憂而憂,後天下之樂而樂歟!」噫!微斯人,吾誰與歸!

時六年九月十五日。

如果問什麼是『字詞』之『意義』?根據《教育大辭書》之

名詞解釋:  字、詞、語句或符號所表達的意旨就是『意義』。

意義的種類上,一般分為『事實的意義』 Factual Meaning 和『情緒性意義』 Emotive Meaning ;如說「那個人」和「他那個人」兩個陳述句中,前者所表達的是事實性意義,而後者則含有情緒性意義。其他哲學家根據不同的標準,也有不同的分類法。

這個『情緒性意義』,該辭書又指出

情緒性意義指在說話者的辭句之中含著某種情感或態度,或者是說話者意在表現一種情感或態度;近似通常所謂之「情見乎詞」的另一面 ,是由詞的意義中見情。 情緒性意義溯源於『維也納學圈』 Vienna Circle 及其後繼者想為『語句的意義』 meaningfulness 建立一個『可以檢證』的規準。有些哲學家曾試從分析『道德』或與『詩辭』探討 ,然而卻難以通過『意義規準』之檢證,例如愉快之為善(如我高興 )是否有『客觀』的『真實性』,便是問題。又如孔子說:「逝者如斯夫,不捨晝夜!」一則是實際可見,一則是「情在其中」,則孔子只是由『經驗』而驗證一項『事實』,抑或是『感歎』時光流逝,也難以用任何基準來證實。

假使說

西方的『思辨理性』長於『批判』,難喜歡『矛盾為伍』;

東方之『生生哲學』善作『類比』,或高興『和光同塵』。

既都是『』,這個『差異』將從何而來?

人總有『』、『』、『』、『』,有時

』『』不能為『』,一會兒

』『』刻意之『』。又該怎麼說??也許一切

源自人有『自我意識』,形成『自我影像』,可以『自我疏離』 ,因此能夠『自欺欺人』,或是迫於『環境社會』所逼,還是無法『認識自己』所致,『人性』長久以來的『積習浸染』── 文化 DNA ?? ── 恐是 □○ 『說不清』的事吧!

─── 《勞動離正義多遠?!

 

欲探樹莓派上的『文轉音』,遇讀

RPi Text to Speech (Speech Synthesis)

 This guide shows you three easy methods of getting your Raspberry Pi to talk, and describes the pros and cons of each.

 

之通論。偶聞

Pico Text to Speech

Google Android TTS engine. Very good quality speech.

sudo apt-get install libttspico-utils
pico2wave -w lookdave.wav "Look Dave, I can see you're really upset about this." && aplay lookdave.wav

Recommendations

I hope this guide has given you some ideas of how you can make use of speech output in your own project. As to which speech package to recommend, Festival works well enough, Espeak is clearer and so easier to understand. Pico (Android TTS) gives very good quality and does not require any internet connection – it’s got everything going for it and is the one I use nowadays.

Take a look at the Adafruit article on RPi speech synthysis – they have some great ideas there too!

All comments/suggestions welcome! Let me know for what you have used speech on your Pi – StevenP on the official Raspberry Pi Forum.

 

的好處!追跡至

Port of Android Pico TTS to the Raspberry Pi

Pico TTS for Raspberry PiThis is a port of the offline text-to-speech engine from Google’s Android operating system to the Raspberry Pi. Pico TTS is specifically designed for embedded devices making it ideal for memory and processing constrained platforms like the Raspberry Pi. The original code was licensed under the Apache 2 license and this derivative keeps that license.This port is a little rough around the edges due to it being a fairly quick and dirty port and my lack of skills in makefile voodoo. I have tried to remove the Android specific files and put the minimal code from the rest of the Android ecosystem. I have left the JNI code in the repository untouched in case anyone fancies getting the Java integration working.The structure of the respository is as follows:

  1. pico_resources/docs/ – Pico TTS documentation A very comprehensive set of documents from the original Pico TTS vendor SVOX.
  2. pico_resources/tools/ – Pico TTS tools Some of the tools used to build the TTS data. I have no idea whether they are useful or not.
  3. pico/lib – The Pico TTS engine itself This this original Pico TTS engine source code. It is very portable and didn’t require any changes to get compiling. The makefile will build libsvoxpico.so which can be used directly using the documentation mentioned above.
  4. pico/tts – High level C++ interface, SSML parser and test application This directory implements a class TtsEngine and a limited Speech Synthesis Markup Language (SSML) implementation. I have also written a simple test program called “ttstest” using these classes to get you started using Pico TTS on the Raspberry Pi.

Building the library and testing it

To build the low level TTS library use the following commands:

cd pico/lib make && sudo make install

This will build the library and put the resulting libsvoxpico.so into the /usr/lib/ folder so it can easily be incorporated into any application.

To build the test application

After completing the above commands now put in the following:

cd ../tts make

You will get an executable file called “ttstest”. This application takes a string as input and will output the raw audio to stdout or to a file using the -o command

Usage: testtts <-o filename.raw> “String to say here”

Options: -o Optional command to output data to a file rather than stdout

Please note the TTS engine outputs audio in the following format: 16000 Hz, 16-bit mono (little endian).

As the test program outputs to stdout you can feed the raw audio data straight into ALSA’s aplay tool to hear the audio on the HDMI or 3.5mm analogue output. Here is an example of how you can do this including the appropriate configuration parameters for aplay:

./testtts “This is a test of the Pico TTS engine on the Raspberry Pi” | aplay –rate=16000 –channels=1 –format=S16_LE

I hope you find this port useful for building your Raspberry Pi based applications. Please feel free to adapt the project to your needs. If you do use this work in your project I would love to hear about it, please drop me a tweet. Thanks.

  • Doug (@DougGore)

 

。既然如是的好,焉能不試試

‧ This is a book.

‧ This is a good book!

‧ This is really a good book ?

呢?