【鼎革‧革鼎】︰ 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 ?

呢?

 

 

 

 

 

 

 

 

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

若想了解『 gnuspeech 』是什麼?最好聽聽官網怎麼講︰

What is gnuspeech?

gnuspeech makes it easy to produce high quality computer speech output, design new language databases, and create controlled speech stimuli for psychophysical experiments. gnuspeechsa is a cross-platform module of gnuspeech that allows command line, or application-based speech output. The software has been released as two tarballs that are available in the project Downloads area of http://savannah.gnu.org/projects/gnuspeech. Those wishing to contribute to the project will find the OS X (gnuspeech) and CMAKE (gnuspeechsa) sources in the Git repository on that same page. The gnuspeech suite still lacks some of the database editing components (see the Overview diagram below) but is otherwise complete and working, allowing articulatory speech synthesis of English, with control of intonation and tempo, and the ability to view the parameter tracks and intonation contours generated. The intonation contours may be edited in various ways, as described in the Monet manual. Monet provides interactive access to the synthesis controls. TRAcT provides interactive access to the underlying tube resonance model that converts the parameters into sound by emulating the human vocal tract.

The suite of programs uses a true articulatory model of the vocal tract and incorporates models of English rhythm and intonation based on extensive research that sets a new standard for synthetic speech.

The original NeXT computer implementation is complete, and is available from the NeXT branch of the SVN repository linked above. The port to GNU/Linux under GNUStep, also in the SVN repository under the appropriate branch, provides English text-to-speech capability, but parts of the database creation tools are still in the process of being ported.

Credits for research and implementation of the gnuspeech system appear the section Thanks to those who have helped below. Some of the features of gnuspeech, with the tools that are part of the software suite, tools include:

  • A Tube Resonance Model (TRM) for the human vocal tract (also known as a transmission-line analog, or a waveguide model) that truly represents the physical properties of the tract, including the energy balance between the nasal and oral cavities as well as the radiation impedance at lips and nose.
  • A TRM Control Model, based on formant sensitivity analysis, that provides a simple, but accurate method of low-level articulatory control. By using the Distinctive Region Model (DRM) only eight slowly varying tube section radii need be specified. The glottal (vocal fold) waveform and various suitably “coloured” random noise signals may be injected at appropriate places to provide voicing, aspiration, frication and noise bursts.
  • Databases which specify: the characteristics of the articulatory postures (which loosely correspond to phonemes); rules for combinations of postures; and information about voicing, frication and aspiration. These are the data required to produce specific spoken languages from an augmented phonetic input. Currently, only the database for the English language exists, though French vowel postures are also included.
  • A text-to-augmented-phonetics conversion module (the Parser) to convert arbitrary text, preferably incorporating normal punctuation, into the form required for applying the synthesis methods.
  • Models of English rhythm and intonation based on extensive researchthat are automatically applied.
  • “Monet”—a database creation and editing system, with a carefully designed graphical user interface (GUI) that allows the databases containing the necessary phonetic data and dynamic rules to be set up and modified in order that the computer can “speak” arbitrary languages.
  • A 70,000+ word English Pronouncing Dictionary with rules for derivatives such as plurals, and adverbs, and including 6000 given names. The dictionary also provides part-of-speech information to faciltate later addition of grammatical parsing that can further improve the excellent pronunciation, rhythm and intonation .
  • Sub-dictionaries that allow different user- or application-specific pronunciations to be substituted for the default pronunciations coming from the main dictionary (not yet ported).
  • Letter-to-sound rules to deal with words that are not in the dictionaries
  • A parser to organise the input and deal with dates, numbers, abbreviations, etc.
  • Tools for managing the dictionary and carrying out analysis of speech.
  • “Synthesizer”—a GUI-based application to allow experimentation with a stand-alone TRM. All parameters, both static and dynamic, may be varied and the output can be monitored and analysed. It is an important component in the research needed to create the databases for target languages.

tts-block-diagram

Overview of the main Articulatory Speech Synthesis System

Why is it called gnuspeech?

It is a play on words. This is a new (g-nu) “event-based” approach to speech synthesis from text, that uses an accurate articulatory model rather than a formant-based approximation. It is also a GNU project, aimed at providing high quality text-to-speech output for GNU/Linux, Mac OS X, and other platforms. In addition, it provides comprehensive tools for psychophysical and linguistic experiments as well as for creating the databases for arbitrary languages.

What is the goal of the gnuspeech project?

The goal of the project is to create the best speech synthesis software on the planet.

─── 《Gnu Speeh 編譯安裝

 

Gnuspeech 初版發行至今已經過了兩年!雖沒有見着什麼更新?仍懷著期盼做了編譯及驗證︰

pi@raspberrypi:~ gnuspeech_sa -c /usr/local/share/gnuspeech/gnuspeechsa/data/en -p /tmp/test_param.txt -o /tmp/test.wav "Hello world." && aplay -q /tmp/test.wav Equation Diphone without formula (ignored). Equation Tetraphone without formula (ignored). Duplicate word: [articulate] Duplicate word: [associate] Duplicate word: [attribute] Duplicate word: [charro] Duplicate word: [combine] Duplicate word: [content] Duplicate word: [contrary] Duplicate word: [estimate] Duplicate word: [export] Duplicate word: [graduate] Duplicate word: [implant] Duplicate word: [imprint] Duplicate word: [incline] Duplicate word: [increase] Duplicate word: [indent] Duplicate word: [initiate] Duplicate word: [insert] Duplicate word: [insult] Duplicate word: [inter] Duplicate word: [intrigue] Duplicate word: [invite] Duplicate word: [la] Duplicate word: [mandate] Duplicate word: [moderate] Duplicate word: [object] Duplicate word: [overbid] Duplicate word: [overburden] Duplicate word: [overdose] Duplicate word: [overdose] Duplicate word: [overdress] Duplicate word: [overdress] Duplicate word: [overdrive] Duplicate word: [overhang] Duplicate word: [overhaul] Duplicate word: [overhaul] Duplicate word: [overlap] Duplicate word: [overlay] Duplicate word: [overlook] Duplicate word: [overman] Duplicate word: [overprint] Duplicate word: [override] Duplicate word: [overrun] Duplicate word: [oversize] Duplicate word: [overwork] Duplicate word: [re] pi@raspberrypi:~ 

 

順道補之以 GitHub 網址︰

GnuspeechSA (Stand-Alone)
=========================

GnuspeechSA is a command-line articulatory synthesizer that converts text to speech.

GnuspeechSA is a port to C++/C of the TTS_Server in the original Gnuspeech (http://www.gnu.org/software/gnuspeech/) source code written for NeXTSTEP, provided by David R. Hill, Leonard Manzara, Craig Schock and contributors.

This project is based on code from Gnuspeech’s Subversion repository,
revision 672, downloaded in 2014-08-02. The source code was obtained from the directories:
nextstep/trunk/ObjectiveC/Monet.realtime
nextstep/trunk/src/SpeechObject/postMonet/server.monet

This software is part of Gnuspeech.

This software includes code from RapidXml (http://rapidxml.sourceforge.net/),
provided by Marcin Kalicinski. See the file src/rapidxml/license.txt
for details.

Status
——

Only english is supported.

License
——-

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the COPYING file for more details.

Usage of gnuspeech_sa
———————

gnuspeech_sa converts the input text to control parameters which will be sent to the tube model. The tube model then synthesizes the speech.

./gnuspeech_sa [-v] -c config_dir -p trm_param_file.txt -o output_file.wav \
“Hello world.”

Synthesizes text from the command line.
-v : verbose

config_dir is the directory that stores the configuration data,
e.g. data/en.
trm_param_file.txt will be generated, containing the tube model
parameters.
output_file.wav will be generated, containing the synthesized speech.

………

 

 

 

 

 

 

 

 

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

人類用著言語溝通自然而然,將之作為『人機界面』談何容易!記得最早與此領域結緣,是因參與輔助弱視者接觸網際網路之

螢幕閱讀器

螢幕閱讀器英語:screen reader)又稱為螢幕報讀軟體,是一種安裝於電腦上的應用程式軟體,用來將文字、圖形以及電腦介面的其他部分(藉文字轉語音(Text-To-Speech, TTS)技術)轉換成語音及/或點字。對於視障者或閱讀障礙者甚有助益,有些人會搭配放大軟體一齊使用。 螢幕閱讀器至少可以讀出:

當使用螢幕報讀軟體時,螢幕是否開啟並不會影響其運作,它本身並不構成一部電腦的要件,只是一個軟體或輸出裝置。

使用者在挑選螢幕報讀軟體時,通常會考量許多因素。包含使用平台 、成本、使用者偏好等,並也會受到其所屬組織(如慈善機構、學校 、任職公司)之影響,而螢幕報讀軟體在選擇上是備受爭議的。

自從Windows 2000以來,微軟作業系統已在其版本中加入名為Microsoft Narrator light-duty之螢幕報讀軟體。而蘋果公司則於其麥金塔作業系統中加入一功能豐富的螢幕報讀軟體VoiceOver。另一方面,Oralux Linux中則裝載了三種螢幕報讀軟體: Emacspeak, Yasr,以及Speakup。而開放軟體GNOME桌面環境則包含了Gnopernicus與Orca兩種螢幕報讀軟體。此外還有許多開放原始碼的螢幕報讀軟體,如適用於GNOME平台的Linux Screen Reader,以及NonVisual Desktop Access for Windows(NVDA)。

 

研究。當時祇覺得果然『電腦語音合成』有『機器味』!!想那鋼琴演奏,尚且依賴彈者之輕重緩急而生韻味,豈又是ㄅ一‧ㄅ一作響的『合成器』可以模擬?不知彼時之『醜小鴨』,今日是否蛻變成了『天鵝』呢??

反思或該趁早精通

PHYSICAL AUDIO SIGNAL PROCESSING FOR VIRTUAL MUSICAL INSTRUMENTS AND AUDIO EFFECTS

JULIUS O. SMITH III
Center for Computer Research in Music and Acoustics (CCRMA)

 

的吧☆

Voice Synthesis

Unquestionably, the most extensive prior work in the 20th century relevant to virtual acoustic musical instruments occurred within the field of speech synthesis [140,143,366,411,338,106,245].A.11 This research was driven by both academic interest and the potential practical benefits of speech compression to conserve telephone bandwidth. It was clear at an early point that the bandwidth of a telephone channel (nominally 200-3200 Hz) was far greater than the “information rate” of speech. It was reasoned, therefore, that instead of encoding the speech waveform, it should be possible to encode instead more slowly varying parameters of a good synthesis model for speech.

Before the 20th century, there were several efforts to simulate the voice mechanically, going back at least until 1779 [141].

……

Vocal Tract Analog Models

There is one speech-synthesis thread that clearly classifies under computational physical modeling, and that is the topic of vocal tract analog models. In these models, the vocal tract is regarded as a piecewise cylindrical acoustic tube. The first mechanical analogue of an acoustic-tube model appears to be a hand-manipulated leather tube built by Wolfgang von Kempelen in 1791, reproduced with improvements by Sir Charles Wheatstone [141]. In electrical vocal-tract analog models, the piecewise cylindrical acoustic tube is modeled as a cascade of electrical transmission line segments, with each cylindrical segment being modeled as a transmission line at some fixed characteristic impedance. An early model employing four cylindrical sections was developed by Hugh K. Dunn in the late 1940s [120]. An even earlier model based on two cylinders joined by a conical section was published by T. Chiba and M. Kajiyama in 1941 [120]. Cylinder cross-sectional areas A_i  were determined based on X-ray images of the vocal tract, and the corresponding characteristic impedances were proportional to \frac{1}{A_i}  . An impedance-based, lumped-parameter approximation to the transmission-line sections was used in order that analog LC ladders could be used to implement the model electronically. By the 1950s, LC vocal-tract analog models included a side-branch for nasal simulation [132].

The theory of transmission lines is credited to applied mathematician Oliver Heaviside (1850-1925), who worked out the telegrapher’s equations (sometime after 1874) as an application of Maxwell’s equations, which he simplified (sometime after 1880) from the original 20 equations of Maxwell to the modern vector formulation.A.12 Additionally, Heaviside is credited with introducing complex numbers into circuit analysis, inventing essentially Laplace-transform methods for solving circuits (sometime between 1880 and 1887), and coining the terms `impedance’ (1886), `admittance‘ (1887), `electret’, `conductance’ (1885), and `permeability’ (1885). A little later, Lord Rayleigh worked out the theory of waveguides (1897), including multiple propagating modes and the cut-off phenomenon.A.13

………

Formant Synthesis Models

A formant synthesizer is a source-filter model in which the source models the glottal pulse train and the filter models the formant resonances of the vocal tract. Constrained linear prediction can be used to estimate the parameters of formant synthesis models, but more generally, formant peak parameters may be estimated directly from the short-time spectrum (e.g., [257]). The filter in a formant synthesizer is typically implemented using cascade or parallel second-order filter sections, one per formant. Most modern rule-based text-to-speech systems descended from software based on this type of synthesis model [257,258,259].

Another type of formant-synthesis method, developed specifically for singing-voice synthesis is called the FOF method [389]. It can be considered an extension of the VOSIM voice synthesis algorithm [220]. In the FOF method, the formant filters are implemented in the time domain as parallel second-order sections; thus, the vocal-tract impulse response is modeled as a sum of three or so exponentially decaying sinusoids. Instead of driving this filter with a glottal pulse wave, a simple impulse is used, thereby greatly reducing computational cost. A convolution of an impulse response with an impulse train is simply a periodic superposition of the impulse response. In the VOSIM algorithm, the impulse response was trimmed to one period in length, thereby avoiding overlap and further reducing computations.

The FOF method also tapers the beginning of the impulse-response using a rising half-cycle of a sinusoid. This qualitatively reduces the “buzziness” of the sound, and compensates for having replaced the glottal pulse with an impulse. In practice, however, the synthetic signal is matched to the desired signal in the frequency domain, and the details of the onset taper are adjusted to optimize audio quality more generally, including to broaden the formant resonances.

One of the difficulties of formant synthesis methods is that formant parameter estimation is not always easy [411]. The problem is particularly difficult when the fundamental frequency <img src=” width=”25″ height=”34″ align=”MIDDLE” border=”0″ /> is so high that the formants are not adequately “sampled” by the harmonic frequencies, such as in high-pitched female voice samples. Formant ambiguities due to insufficient spectral sampling can often be resolved by incorporating additional physical constraints to the extent they are known.

Formant synthesis is an effective combination of physical and spectral modeling approaches. It is a physical model in that there is an explicit division between glottal-flow wave generation and the formant-resonance filter, despite the fact that a physical model is rarely used for either the glottal waveform or the formant resonator. On the other hand, it is a spectral modeling method in that its parameters are estimated by explicitly matching short-time audio spectra of desired sounds. It is usually most effective for any synthesis model, physical or otherwise, to be optimized in the “audio perception” domain to the extent it is known how to do this [315,166]. For an illustrative example, see, e.g., [202].

 

且藉『語音合成』

Speech synthesis

Speech synthesis is the artificial production of human speech. A computer system used for this purpose is called a speech computer or speech synthesizer, and can be implemented in software or hardware products. A text-to-speech (TTS) system converts normal language text into speech; other systems render symbolic linguistic representations like phonetic transcriptions into speech.[1]

Synthesized speech can be created by concatenating pieces of recorded speech that are stored in a database. Systems differ in the size of the stored speech units; a system that stores phones or diphones provides the largest output range, but may lack clarity. For specific usage domains, the storage of entire words or sentences allows for high-quality output. Alternatively, a synthesizer can incorporate a model of the vocal tract and other human voice characteristics to create a completely “synthetic” voice output.[2]

The quality of a speech synthesizer is judged by its similarity to the human voice and by its ability to be understood clearly. An intelligible text-to-speech program allows people with visual impairments or reading disabilities to listen to written words on a home computer. Many computer operating systems have included speech synthesizers since the early 1990s.

Overview of a typical TTS system

A text-to-speech system (or “engine”) is composed of two parts:[3] a front-end and a back-end. The front-end has two major tasks. First, it converts raw text containing symbols like numbers and abbreviations into the equivalent of written-out words. This process is often called text normalization, pre-processing, or tokenization. The front-end then assigns phonetic transcriptions to each word, and divides and marks the text into prosodic units, like phrases, clauses, and sentences. The process of assigning phonetic transcriptions to words is called text-to-phoneme or grapheme-to-phoneme conversion. Phonetic transcriptions and prosody information together make up the symbolic linguistic representation that is output by the front-end. The back-end—often referred to as the synthesizer—then converts the symbolic linguistic representation into sound. In certain systems, this part includes the computation of the target prosody (pitch contour, phoneme durations),[4] which is then imposed on the output speech.

 

作個故事接續

 

 

 

 

 

 

 

【鼎革‧革鼎】︰ Raspbian Stretch 《六之 K.2-sd.VIII 》

今天是自由日,什麼是自由呢?維基百科詞條這麼說︰

自由英語:freedom)有多種含義:

  1. 意指由憲法基本法所保障的一種權利或自由權,包括政府在內任何人都不可以不起訴或以莫須有的罪名而拘捕扣留任何人。[1]
  2. 把個人從某些非政府的私權力中解放, 如奴隸主父母丈夫軍閥地主資本家等。
  3. 任性意義的自由。想說什麼就說什麼,想做什麼就做什麼。自由放任
  4. 規律辦事意義下的自由,所謂對必然的認識和改造。
  5. 自律英語:autonomous)意義下的自由。康德在此意義上使用自由一詞。
  6. 是人在自己所擁有的領域自主追求自己設定目標的權利
  7. 不干涉別人的私人生活,只要不危害旁人就不應當禁制,如個人的私有財產隱私性取向信仰政治主張、嗜好,但對於怎樣界定有嚴重的分歧,這也是到底放縱和自律的定義標準問題。
  8. 把被外國侵略中解放殖民地領土,恢復獨立或歸還原有國家的 。
  9. 不具有性別意識、思想,認為性別是對自己和人身自由的一種限制 。

法國19世紀畫家德拉克羅瓦名畫:自由引導人民

法國大革命綱領性文件《人權宣言》中,對自由的定義為:

自由即有權做一切無害於他人的任何事情。
— 法國大革命綱領性文件《人權宣言》第4條(節選),1789年

絕對的自由在理論上可能存在,但由於社會是由人與人所組成,自由不僅是個人的議題,而是社會中各個主體之間彼此互相界定的程度,因此托馬斯·傑斐遜認為個人的自由受制於他人的同等的自由。進而有人認為[誰?]自由與責任相關,有相關之自由即應負相關之責任。自由的邊界是人權,自由止於人權。

自由是政治哲學的核心概念。自由也是一種社會概念。自由是社會人的權利。與自由相對的,是奴役

孫中山多次在演講中引述彌爾的話指出,一個人的自由,以不侵犯他人的自由為範圍,才是真自由。如果侵犯他人的範圍,便是不自由[2]

第二次世界大戰中(1941年1月6日),美國總統羅斯福在國情咨文中提出了著名的「四大自由[3]

在未來的日子裡,我們嚮往並需要確保一個由必要的人類自由構成的世界: 第一,言論與表達的自由——在世界上的所有地方。 第二,一切人民以自己的方式崇拜他們神祇的自由——在世界上的所有地方。 第三,免於匱乏的自由——以世界性的角度來說,可使每一個國家的所有居民享受在和平時期健康生活的經濟基礎——在世界上的所有地方。 第四,免於恐懼的自由——以世界性的角度來說,全球的兵力削減以至於任何國家都沒有對其鄰邦進行武力入侵的可能——在世界上的任何地方。

——富蘭克林·德拉諾·羅斯福,美利堅合眾國國情咨文 ,1941年1月6日

簡略來說,這四大自由便是言論自由宗教自由免於匱乏的自由免於恐懼的自由

聯合國世界人權宣言重申了這四大自由的精神:「人人享有言論和信仰自由並免予恐懼和匱乏」(《世界人權宣言》)

20世紀下半葉,以賽亞·伯林開始用「兩種自由」的概念來劃分自由 :「消極自由」和「積極自由」。他認為,積極自由是指人在「主動  」意義上的自由,即作為主體的 人做的決定和選擇,均基於自身的主動意志而非任何外部力量。當一個人是自主的或自決的,他就處於「積極」自由的狀態之中。這種自由是「去做……的自由」。 而消極自由指的是在「被動」意義上的自由。即人在意志上不受他人的強制 ,在行為上不受他人的干涉,也就是「免於強制和干涉」的狀態。

 

或許善於傾聽,話語溫暖,樂在分享,自然心靈自由自在吧!

偶遇 SD 回呼串流歸結也。

Callback Streams

Callback “wire” with sounddevice.Stream:

import sounddevice as sd
duration = 5.5  # seconds

def callback(indata, outdata, frames, time, status):
    if status:
        print(status)
    outdata[:] = indata

with sd.Stream(channels=2, callback=callback):
    sd.sleep(int(duration * 1000))

Same thing with sounddevice.RawStream:

import sounddevice as sd
duration = 5.5  # seconds

def callback(indata, outdata, frames, time, status):
    if status:
        print(status)
    outdata[:] = indata

with sd.RawStream(channels=2, dtype='int24', callback=callback):
    sd.sleep(int(duration * 1000))

※ 參考

class sounddevice.Stream(samplerate=None, blocksize=None, device=None, channels=None, dtype=None, latency=None, extra_settings=None, callback=None, finished_callback=None, clip_off=None, dither_off=None, never_drop_input=None, prime_output_buffers_using_stream_callback=None)

Open a stream for simultaneous input and output.

To open an input-only or output-only stream use InputStream or OutputStream, respectively. If you want to handle audio data as plain buffer objects instead of NumPy arrays, use RawStream, RawInputStream or RawOutputStream.

A single stream can provide multiple channels of real-time streaming audio input and output to a client application. A stream provides access to audio hardware represented by one or more devices. Depending on the underlying host API, it may be possible to open multiple streams using the same device, however this behavior is implementation defined. Portable applications should assume that a device may be simultaneously used by at most one stream.

The arguments device, channels, dtype and latency can be either single values (which will be used for both input and output parameters) or pairs of values (where the first one is the value for the input and the second one for the output).

All arguments are optional, the values for unspecified parameters are taken from the default object. If one of the values of a parameter pair is None, the corresponding value from default will be used instead.

The created stream is inactive (see active, stopped). It can be started with start().

Every stream object is also a context manager, i.e. it can be used in a with statement to automatically call start() in the beginning of the statement and stop() and close() on exit.

………

 

 

 

 

 

 

 

 

【鼎革‧革鼎】︰ Raspbian Stretch 《六之 K.2-sd.VII 》

假如我們能製作『水中派』,是否就有了探測『聲納』!

Sonar signal processing

Sonar systems are generally used underwater for range finding and detection. Active sonar emits an acoustic signal, or pulse of sound, into the water. The sound bounces off the target object and returns an “echo” to the sonar transducer. Unlike active sonar, passive sonar does not emit its own signal, which is an advantage for military vessels. But passive sonar cannot measure the range of an object unless it is used in conjunction with other passive listening devices. Multiple passive sonar devices must be used for triangulation of a sound source. No matter whether active sonar or passive sonar, the information included in the reflected signal can not be used without technical signal processing. To extract the useful information from the mixed signal, some steps are taken to transfer the raw acoustic data.

 

得以一訪『美人魚』故鄉?

Mermaid

A mermaid is a legendary aquatic creature with the head and upper body of a female human and the tail of a fish.[1] Mermaids appear in the folklore of many cultures worldwide, including the Near East, Europe, Africa and Asia. The first stories appeared in ancient Assyria, in which the goddess Atargatis transformed herself into a mermaid out of shame for accidentally killing her human lover. Mermaids are sometimes associated with perilous events such as floods, storms, shipwrecks and drownings. In other folk traditions (or sometimes within the same tradition), they can be benevolent or beneficent, bestowing boons or falling in love with humans.

The male equivalent of the mermaid is the merman, also a familiar figure in folklore and heraldry. Although traditions about and sightings of mermen are less common than those of mermaids, they are generally assumed to co-exist with their female counterparts.

Some of the attributes of mermaids may have been influenced by the Sirens of Greek mythology. Historical accounts of mermaids, such as those reported by Christopher Columbus during his exploration of the Caribbean, may have been inspired by manatees and similar aquatic mammals. While there is no evidence that mermaids exist outside folklore, reports of mermaid sightings continue to the present day, including 21st century examples from Israel and Zimbabwe.

Mermaids have been a popular subject of art and literature in recent centuries, such as in Hans Christian Andersen‘s well-known fairy tale “The Little Mermaid” (1836). They have subsequently been depicted in operas, paintings, books, films and comics.

A Mermaid (1900) by John William Waterhouse

 

那個 SoundDevice 的

Simultaneous Playback and Recording

To play back an array and record at the same time, use sounddevice.playrec():

myrecording = sd.playrec(myarray, fs, channels=2)

The number of output channels is obtained from myarray, but the number of input channels still has to be specified.

Again, default values can be used:

sd.default.samplerate = fs
sd.default.channels = 2
myrecording = sd.playrec(myarray)

In this case the number of output channels is still taken from myarray (which may or may not have 2 channels), but the number of input channels is taken from sounddevice.default.channels.

 

果真不是為此而設??

邀人在陸上,先勤練眼力呦!!