Notice: Trying to access array offset on value of type bool in /home1/freesand/public_html/wp-content/plugins/wiki-embed/WikiEmbed.php on line 112

Notice: Trying to access array offset on value of type bool in /home1/freesand/public_html/wp-content/plugins/wiki-embed/WikiEmbed.php on line 112

Notice: Trying to access array offset on value of type bool in /home1/freesand/public_html/wp-content/plugins/wiki-embed/WikiEmbed.php on line 116
1 月 | 2018 | FreeSandal

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

甌北詩話·蘇東坡詩》 清·趙翼

以文為詩,自昌黎始;至東坡益大放厥詞,別開生面,成一代之大觀 。今試平心讀之,大概才思橫溢,觸處生春,胸中書卷繁富,又足以供其左旋右抽,無不如志。其尤不可及者,天生健筆一枝,爽如哀梨 ,快如并剪,有必達之隱,無難顯之情,此所以繼李、杜後為一大家也。而其不如李、杜處,亦在此。蓋李詩如高闃游空,杜詩如喬嶽之矗天,蘇詩如流水之行地。讀詩者於此處著眼,可得三家之真矣。

坡詩不尚雄傑一派,其絕人處在乎議論英爽,筆鋒精銳,舉重若輕,讀之似不甚用力,而力已透十分,此天才也。試即其詩,略為舉似。五古如:”讀書想前輩,每恨生不早。紛紛少年場,猶得見此老。”《哭刁景純》”餘光幸分我,不死安可獨。”《答陳季常》”丈夫貴出世 ,功名豈人傑。”《和陶詩》”年來萬事足,所欠惟一死。”《海外歸贈鄭秀才》七古如:”當其下手風雨快,筆所未到氣已吞。”《題王維吳道子畫》”世人豈不碩且好,身雖未病中已疲。此叟神完中有恃,談笑可耷熊羆。至今遣像兀不語,與昔未死無增虧。”《題楊惠之塑維摩像 》”雖無尺與寸刀,口吻排擊含風霜。”《送劉道原》”顏公變法出新意 ,細筋入骨如秋蠅。徐家父子亦秀絕,字外出力中藏棱。”《墨妙亭詩 》”耕田欲雨刈欲晴,去得順風來者怨。若使人人禱輒遂,造物應須日千變。”《泗州僧伽塔》”我從山水窟中來,尚愛此山看不足。”《游道場山河山》”世上小兒誇疾走,如君相待今安有!”《往富陽李節推先行留風水洞見待》”黃雞催曉不須愁,老盡世人非我獨。”《與宗同年飲》”覺來落筆不經意,神妙獨到秋毫顛。”《題吳道子畫》”長松千尺不自覺,企而羨者蓬與蒿。”《趙閱道高齋詩》”腳力盡時山更好,莫將有限趁無窮。”《登玲瓏山詩》此皆坡詩中最上乘,讀者可見其才分之高,不在功力之苦也。

 

看人舉重若輕,其來有自乎?且依 nickoala 文本作番環境驗證也。

Know the Sound Cards

pi@raspberrypi:~ more /proc/asound/cards  0 [ALSA           ]: bcm2835 - bcm2835 ALSA                       bcm2835 ALSA  1 [seeed4micvoicec]: seeed-4mic-voic - seeed-4mic-voicecard                       seeed-4mic-voicecard pi@raspberrypi:~ 

The first is Raspberry Pi’s built-in sound card. It has an index of 0. (Note the word ALSA. It means Advanced Linux Sound Architecture. Simply put, it is the sound driver on many Linux systems.)

The second is the USB device’s sound card. It has an index of 1.

Your settings might be different. But if you are using Pi 3 with Jessie and have not changed any sound settings, the above situation is likely. For the rest of discussions, I am going to assume:

  • Built-in sound card, index 0 → headphone jack → speaker
  • USB sound card, index 1 → microphone

The index is important. It is how you tell Raspberry Pi where the speaker and microphone is.

我們用的是 ReSpeaker 4Mic。

 

Test the speaker

pi@raspberrypi:~ speaker-test -t wav  speaker-test 1.1.3  Playback device is default Stream parameters are 48000Hz, S16_LE, 1 channels WAV file(s) Rate set to 48000Hz (requested 48000Hz) Buffer size range from 512 to 65536 Period size range from 512 to 65536 Using max buffer size 65536 Periods = 4 was set period_size = 16384 was set buffer_size = 65536  0 - Front Left Time per period = 0.385015  0 - Front Left Time per period = 1.362121  0 - Front Left Time per period = 1.369963  0 - Front Left ^CTransfer failed: 錯誤的位址 pi@raspberrypi:~ 

 

Press Ctrl-C when done.

系統喇叭 OK 。

 

Record a WAV file

Enter this command, then speak to the mic, press  Ctrl-C when you are finished:

pi@raspberrypi:~ arecord -D plughw:1,0 abc.wav Recording WAVE 'abc.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono arecord: set_params:1363: Unable to install hw params: ACCESS:  RW_INTERLEAVED FORMAT:  U8 SUBFORMAT:  STD SAMPLE_BITS: 8 FRAME_BITS: 8 CHANNELS: 1 RATE: 8000 PERIOD_TIME: 125000 PERIOD_SIZE: 1000 PERIOD_BYTES: 1000 PERIODS: 4 BUFFER_TIME: 500000 BUFFER_SIZE: 4000 BUFFER_BYTES: 4000 TICK_TIME: 0 pi@raspberrypi:~

 

pi@raspberrypi:~ arecord -D plughw:1,0 -r 48000 abc.wav Recording WAVE 'abc.wav' : Unsigned 8 bit, Rate 48000 Hz, Mono ^CAborted by signal 中斷... pi@raspberrypi:~

-D plughw:1,0 tells arecord where the device is. In this case, device is the mic. It is at index 1.

plughw:1,0 actually refers to “Sound Card index 1, Subdevice 0”, because a sound card may house many subdevices. Here, we don’t care about subdevices and always give it a 0. The only important index is the sound card’s.

ReSpeaker 預設的 2ch Mic 取樣頻率為 48K 。

 

Play a WAV file

pi@raspberrypi:~ aplay -D plughw:0,0 abc.wav Playing WAVE 'abc.wav' : Unsigned 8 bit, Rate 48000 Hz, Mono pi@raspberrypi:~

Here, we tell aplay to play to plughw:0,0, which refers to “Sound Card index 0, Subdevice 0”, which leads to the speaker.

If you aplay and arecord successfully, that means the speaker and microphone are working properly. We can move on to add more capabilities.

錄音播放 OK 。

 

Install Pico, the Text-to-Speech engine

pi@raspberrypi:~ pico2wave -w abc.wav "Good morning. How are you today?" pi@raspberrypi:~ aplay -D plughw:0,0 abc.wav
Playing WAVE 'abc.wav' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
pi@raspberrypi:~ </pre> <span style="color: #666699;">測試 OK 。</span>    <h2><span style="color: #ff9900;">Install Pocketsphinx, the Speech-to-Text engine</span></h2> <pre class="lang:default decode:true"> sudo apt-get install pocketsphinx                     # Jessie
sudo apt-get install pocketsphinx pocketsphinx-en-us  # Stretch pocketsphinx_continuous -adcdev plughw:1,0 -inmic yes

pocketsphinx_continuous interprets speech in real-time. It will spill out a lot of stuff, ending with something like this:

pi@raspberrypi:~ $ pocketsphinx_continuous -adcdev plughw:1,0 -inmic yes
INFO: pocketsphinx.c(145): Parsed model-specific feature parameters from /usr/share/pocketsphinx/model/en-us/en-us/feat.params
Current configuration:
[NAME]			[DEFLT]		[VALUE]
-agc			none		none
-agcthresh		2.0		2.000000e+00
-allphone				
-allphone_ci		no		no
-alpha			0.97		9.700000e-01
-ascale			20.0		2.000000e+01
-aw			1		1
-backtrace		no		no
-beam			1e-48		1.000000e-48
-bestpath		yes		yes
-bestpathlw		9.5		9.500000e+00
-ceplen			13		13
-cmn			current		current
-cmninit		8.0		40,3,-1
-compallsen		no		no
-debug					0
-dict					/usr/share/pocketsphinx/model/en-us/cmudict-en-us.dict
-dictcase		no		no
-dither			no		no
-doublebw		no		no
-ds			1		1
-fdict					/usr/share/pocketsphinx/model/en-us/en-us/noisedict
-feat			1s_c_d_dd	1s_c_d_dd
-featparams				/usr/share/pocketsphinx/model/en-us/en-us/feat.params
-fillprob		1e-8		1.000000e-08
-frate			100		100
-fsg					
-fsgusealtpron		yes		yes
-fsgusefiller		yes		yes
-fwdflat		yes		yes
-fwdflatbeam		1e-64		1.000000e-64
-fwdflatefwid		4		4
-fwdflatlw		8.5		8.500000e+00
-fwdflatsfwin		25		25
-fwdflatwbeam		7e-29		7.000000e-29
-fwdtree		yes		yes
-hmm					/usr/share/pocketsphinx/model/en-us/en-us
-input_endian		little		little
-jsgf					
-keyphrase				
-kws					
-kws_delay		10		10
-kws_plp		1e-1		1.000000e-01
-kws_threshold		1		1.000000e+00
-latsize		5000		5000
-lda					
-ldadim			0		0
-lifter			0		22
-lm					/usr/share/pocketsphinx/model/en-us/en-us.lm.bin
-lmctl					
-lmname					
-logbase		1.0001		1.000100e+00
-logfn					
-logspec		no		no
-lowerf			133.33334	1.300000e+02
-lpbeam			1e-40		1.000000e-40
-lponlybeam		7e-29		7.000000e-29
-lw			6.5		6.500000e+00
-maxhmmpf		30000		30000
-maxwpf			-1		-1
-mdef					/usr/share/pocketsphinx/model/en-us/en-us/mdef
-mean					/usr/share/pocketsphinx/model/en-us/en-us/means
-mfclogdir				
-min_endfr		0		0
-mixw					
-mixwfloor		0.0000001	1.000000e-07
-mllr					
-mmap			yes		yes
-ncep			13		13
-nfft			512		512
-nfilt			40		25
-nwpen			1.0		1.000000e+00
-pbeam			1e-48		1.000000e-48
-pip			1.0		1.000000e+00
-pl_beam		1e-10		1.000000e-10
-pl_pbeam		1e-10		1.000000e-10
-pl_pip			1.0		1.000000e+00
-pl_weight		3.0		3.000000e+00
-pl_window		5		5
-rawlogdir				
-remove_dc		no		no
-remove_noise		yes		yes
-remove_silence		yes		yes
-round_filters		yes		yes
-samprate		16000		1.600000e+04
-seed			-1		-1
-sendump				/usr/share/pocketsphinx/model/en-us/en-us/sendump
-senlogdir				
-senmgau				
-silprob		0.005		5.000000e-03
-smoothspec		no		no
-svspec					0-12/13-25/26-38
-tmat					/usr/share/pocketsphinx/model/en-us/en-us/transition_matrices
-tmatfloor		0.0001		1.000000e-04
-topn			4		4
-topn_beam		0		0
-toprule				
-transform		legacy		dct
-unit_area		yes		yes
-upperf			6855.4976	6.800000e+03
-uw			1.0		1.000000e+00
-vad_postspeech		50		50
-vad_prespeech		20		20
-vad_startspeech	10		10
-vad_threshold		2.0		2.000000e+00
-var					/usr/share/pocketsphinx/model/en-us/en-us/variances
-varfloor		0.0001		1.000000e-04
-varnorm		no		no
-verbose		no		no
-warp_params				
-warp_type		inverse_linear	inverse_linear
-wbeam			7e-29		7.000000e-29
-wip			0.65		6.500000e-01
-wlen			0.025625	2.562500e-02

INFO: feat.c(715): Initializing feature stream to type: '1s_c_d_dd', ceplen=13, CMN='current', VARNORM='no', AGC='none'
INFO: cmn.c(143): mean[0]= 12.00, mean[1..12]= 0.0
INFO: acmod.c(164): Using subvector specification 0-12/13-25/26-38
INFO: mdef.c(518): Reading model definition: /usr/share/pocketsphinx/model/en-us/en-us/mdef
INFO: mdef.c(531): Found byte-order mark BMDF, assuming this is a binary mdef file
INFO: bin_mdef.c(336): Reading binary model definition: /usr/share/pocketsphinx/model/en-us/en-us/mdef
INFO: bin_mdef.c(516): 42 CI-phone, 137053 CD-phone, 3 emitstate/phone, 126 CI-sen, 5126 Sen, 29324 Sen-Seq
INFO: tmat.c(206): Reading HMM transition probability matrices: /usr/share/pocketsphinx/model/en-us/en-us/transition_matrices
INFO: acmod.c(117): Attempting to use PTM computation module
INFO: ms_gauden.c(198): Reading mixture gaussian parameter: /usr/share/pocketsphinx/model/en-us/en-us/means
INFO: ms_gauden.c(292): 42 codebook, 3 feature, size: 
INFO: ms_gauden.c(294):  128x13
INFO: ms_gauden.c(294):  128x13
INFO: ms_gauden.c(294):  128x13
INFO: ms_gauden.c(198): Reading mixture gaussian parameter: /usr/share/pocketsphinx/model/en-us/en-us/variances
INFO: ms_gauden.c(292): 42 codebook, 3 feature, size: 
INFO: ms_gauden.c(294):  128x13
INFO: ms_gauden.c(294):  128x13
INFO: ms_gauden.c(294):  128x13
INFO: ms_gauden.c(354): 222 variance values floored
INFO: ptm_mgau.c(476): Loading senones from dump file /usr/share/pocketsphinx/model/en-us/en-us/sendump
INFO: ptm_mgau.c(500): BEGIN FILE FORMAT DESCRIPTION
INFO: ptm_mgau.c(563): Rows: 128, Columns: 5126
INFO: ptm_mgau.c(595): Using memory-mapped I/O for senones
INFO: ptm_mgau.c(835): Maximum top-N: 4
INFO: phone_loop_search.c(114): State beam -225 Phone exit beam -225 Insertion penalty 0
INFO: dict.c(320): Allocating 138623 * 20 bytes (2707 KiB) for word entries
INFO: dict.c(333): Reading main dictionary: /usr/share/pocketsphinx/model/en-us/cmudict-en-us.dict
INFO: dict.c(213): Allocated 1014 KiB for strings, 1677 KiB for phones
INFO: dict.c(336): 134522 words read
INFO: dict.c(358): Reading filler dictionary: /usr/share/pocketsphinx/model/en-us/en-us/noisedict
INFO: dict.c(213): Allocated 0 KiB for strings, 0 KiB for phones
INFO: dict.c(361): 5 words read
INFO: dict2pid.c(396): Building PID tables for dictionary
INFO: dict2pid.c(406): Allocating 42^3 * 2 bytes (144 KiB) for word-initial triphones
INFO: dict2pid.c(132): Allocated 21336 bytes (20 KiB) for word-final triphones
INFO: dict2pid.c(196): Allocated 21336 bytes (20 KiB) for single-phone word triphones
INFO: ngram_model_trie.c(456): Trying to read LM in trie binary format
INFO: ngram_search_fwdtree.c(99): 790 unique initial diphones
INFO: ngram_search_fwdtree.c(148): 0 root, 0 non-root channels, 57 single-phone words
INFO: ngram_search_fwdtree.c(186): Creating search tree
INFO: ngram_search_fwdtree.c(192): before: 0 root, 0 non-root channels, 57 single-phone words
INFO: ngram_search_fwdtree.c(326): after: max nonroot chan increased to 152144
INFO: ngram_search_fwdtree.c(339): after: 722 root, 152016 non-root channels, 53 single-phone words
INFO: ngram_search_fwdflat.c(157): fwdflat: min_ef_width = 4, max_sf_win = 25
INFO: continuous.c(305): pocketsphinx_continuous COMPILED ON: May 22 2016, AT: 22:01:16

READY....
Listening...

Now, speak into the mic, and note the results. At first, you may find it funny. After a while, you realize it is horribly inaccurate.

確認。

相信一路走來讀者,自然得手應心吧◎

 

 

 

 

 

 

 

 

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

借徑維基百科的詞條

語音識別

語音識別(speech recognition;語音辨識言語辨別)技術,也被稱為自動語音識別英語:Automatic Speech Recognition, ASR)、電腦語音識別英語:Computer Speech Recognition)或是語音轉文本識別(英語:Speech To Text, STT,其目標是以電腦自動將人類的語音內容轉換為相應的文字。與說話人識別說話人確認不同,後者嘗試識別或確認發出語音的說話人而非其中所包含的詞彙內容。

語音識別技術的應用包括語音撥號、語音導航、室內設備控制、語音文檔檢索、簡單的聽寫數據錄入等。語音識別技術與其他自然語言處理技術如機器翻譯語音合成技術相結合,可以構建出更加複雜的應用,例如語音到語音的翻譯。[1]

語音識別技術所涉及的領域包括:信號處理模式識別機率論資訊理論、發聲機理和聽覺機理、人工智慧等等。

歷史

早在計算機發明之前,自動語音識別的設想就已經被提上了議事日程,早期的聲碼器可被視作語音識別及合成的雛形。而1920年代生產的”Radio Rex”玩具狗可能是最早的語音識別器,當這隻狗的名字被呼喚的時候,它能夠從底座上彈出來[2]。最早的基於電子計算機的語音識別系統是由AT&T貝爾實驗室開發的Audrey語音識別系統,它能夠識別10個英文數字。其識別方法是跟蹤語音中的共振峰。該系統得到了98%的正確率。[3]。到1950年代末,倫敦學院(Colledge of London)的Denes已經將語法機率加入語音識別中。

1960年代,人工神經網絡被引入了語音識別。這一時代的兩大突破是線性預測編碼Linear Predictive Coding (LPC), 及動態時間規整Dynamic Time Warp技術。

語音識別技術的最重大突破是隱含馬爾科夫模型Hidden Markov Model的應用。從Baum提出相關數學推理,經過Rabiner等人的研究,卡內基梅隆大學李開復最終實現了第一個基於隱馬爾科夫模型的大詞彙量語音識別系統Sphinx[4]。此後嚴格來說語音識別技術並沒有脫離HMM框架。

儘管多年來研究人員一直嘗試將「聽寫機」推廣,語音識別技術在目前還無法支持無限領域,無限說話人的聽寫機應用。

 

通往卡內基梅隆大學 CMUSphinx 之發展歷史 ︰

About CMUSphinx

CMUSphinx collects over 20 years of the CMU research. All advantages are hard to list, but just to name a few:

  • State of art speech recognition algorithms for efficient speech recognition. CMUSphinx tools are designed specifically for low-resource platforms
  • Flexible design
  • Focus on practical application development and not on research
  • Support for several languages like US English, UK English, French, Mandarin, German, Dutch, Russian and ability to build a models for others
  • BSD-like license which allows commercial distribution
  • Commercial support
  • Active development and release schedule
  • Active community (more than 400 users on Linkedin CMUSphinx group)
  • Wide range of tools for many speech-recognition related purposes (keyword spotting, alignment, pronuncation evaluation)

 

卻煩惱與其從頭開始講

CMU Sphinx Downloads

Software

CMU Sphinx toolkit has a number of packages for different tasks and applications. It’s sometimes confusing what to choose. To cleanup, here is the list

  • Pocketsphinx — recognizer library written in C.
  • Sphinxtrain — acoustic model training tools
  • Sphinxbase — support library required by Pocketsphinx and Sphinxtrain
  • Sphinx4 — adjustable, modifiable recognizer written in Java

We recommend you to use the latest available releases:

If you want to try bleeding edge version, pull the latest code from Github. Then compile packages from the source code, but remember that there is no guarantee they will be stable.

http://github.com/cmusphinx

Older releases and files could be found on SourceForge http://sourceforge.net/projects/cmusphinx/files/

We do not maintain distribution-specific packages yet, but help to update them is truely appreciated. Some distributions already include CMUSphinx packages:

Models

CMUSphinx assumes that you use the statistical models which describe language. There are many models trained for various acoustic conditions and various performance requirements. We collect the best models available at our download page. We hope you’ll be able to find the best model for your language there:

Download models

……

 

不如假託故事

Judy – Simplified Voice Control on Raspberry Pi

Judy is a simplified sister of Jasper, with a focus on education. It is designed to run on:

Raspberry Pi 3
Raspbian Jessie
Python 2.7

Unlike Jasper, Judy does not try to be cross-platform, does not allow you to pick your favorite Speech-to-Text engine or Text-to-Speech engine, does not come with an API for pluggable modules. Judy tries to keep things simple, lets you experience the joy of voice control with as little hassle as possible.

A Speech-to-Text engine is a piece of software that interprets human voice into a string of text. It lets the computer know what is being said. Conversely, a Text-to-Speech engine converts text into sound. It allows the computer to speak, probably as a response to your command.

Judy uses:

Additionally, you need:

  • a Speaker to plug into Raspberry Pi’s headphone jack
  • a USB Microphone

Plug them in. Let’s go.

 

談點語音控制呦◎

 

 

 

 

 

 

 

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

當 □ □ 的理論,用 ○ ○ 的話語來講,『意義』是否會『改變』?『現象』自然就『道遷』??『理化』當真能『不同』???天經地義的該是︰

真理不分東西!學問沒有國界!!科學不在人種!!!

回歸到︰

事實』是『決疑』之依據,『實驗』是『決疑』的方法。

懷抱著『卡文迪什』之『萊頓瓶』吧︰

人們對『事物』的『認識』可以說始於產生『分類』,對『概念』的『理解』也許來自於辨別『異同』。從一個『物理模型』對應的『數學描述』,很容易轉變成用『數學模型』來作『抽象論述』 ,既然得之於『定義精確』、『邏輯嚴謹』和『體系推導』,就難免需要『精讀定義』、『確認關鍵』與『旁敲側擊』之仔細的『閱讀 』。在《Thue 之改寫系統《一》》一文中,我們談到了『抽象系統 』之『公理化』與『抽象化』的這個『趨勢』。或許說,『理論』起源於『觀察』就有一定的『經驗性』;『自然律』的『歸納』也常沾一些『直覺性』;建構創造『物理模型』說明『現象』總是帶著點『猜測性』。統合來講﹐也許就『事物認識』和『概念理解』祇要能夠『定義適切』、『推理清晰』與『脈絡分明』將會是一種『左右腦平衡』的『方式』吧!

地球經絡

蓋亞之經絡

地球的經線

Earthmap720x360_grid

Kramer ︰ Does the meridians exits ?

克拉馬︰ 針灸能治病!

Kramer ︰  我在意的是『它是不是個存有』??

克拉馬︰ Does The  Love ever exits?

Just Love to or not Love to !!

─── 《《承轉》之《決疑‧上》!!

 

請問之前的

AlphaGo

為什麼會輸給之後的

AlphaGo

呢?

設使兩 ╳ 同級之

AlphaGo

對奕

哪個輸哪個贏呢??

果有必勝之法乎!!!

邏輯中

偶然 vs 必然

的理則

到底是什麼耶???

探索之大門幾曾被關閉的哩◎

awesome-chinese-nlp

Awesome

A curated list of resources for NLP (Natural Language Processing) for Chinese

中文自然语言处理相关资料

图片来自复旦大学邱锡鹏教授

Contents 列表

1. Chinese NLP Toolkits 中文NLP工具

2. Corpus 中文语料

3. Organizations 相关中文NLP组织和会议

4. Learning Materials 学习资料

 

 

 

 

 

 

 

 

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

派生碼訊

丑 牛

錦瑟‧李商隱

錦瑟無端五十弦,一弦一柱思華年。
莊生曉夢迷蝴蝶,望帝春心託杜鵑。
滄海月明珠有淚,藍田日暖玉生煙。
此情可待成追憶,只是當時已惘然。

白金西︰所謂明智,是能將事後之明﹐用於臨事之前。當真為『回反』者也。

派 ︰西有『葉慈』者,浪漫賦神秘,善寫《奧義詩》,其詞雖簡易,其意實難測︰

The Song of Wandering Aengus
W.B. Yeats (1899)

I went out to the hazel wood,
Because a fire was in my head,
And cut and peeled a hazel wand,
And hooked a berry to a thread;
And when white moths were on the wing,
And moth-like stars were flickering out,
I dropped the berry in a stream
And caught a little silver trout.

When I had laid it on the floor
I went to blow the fire aflame,
But something rustled on the floor,
And some one called me by my name:
It had become a glimmering girl
With apple blossom in her hair
Who called me by my name and ran
And faded through the brightening air.

Though I am old with wandering
Through hollow lands and hilly lands,
I will find out where she has gone,
And kiss her lips and take her hands;
And walk among long dappled grass,
And pluck till time and times are done
The silver apples of the moon,
The golden apples of the sun.

漂泊的安格絲之歌
葉慈

我前往榛子林
顱腔熱火在呼喚
切剝榛枝正嫩
漿果鉤住了思緒
忽而,白蛾乘羽翼
星兒彷彿蠹飛影搖曳
拋莓入溪後
恰獲一尾小銀鮭

 

任之將之委諸地
反身吹燃燄
簌簌有聲來處響
誰人在呼喚我之名
怎想它早已化作微光少女
蘋果花,隨髮絲綻放
她既呼喚我之名又奔棄
漸淡入,黎明空靈中

 

 

儘管年華因著漂泊老
穿越山谷和山丘
誓將找到她鄉去時路
吻芳唇,攜伊之手
漫步長斑青草間
採綠意,直至時盡次不再
月月銀林檎
日日金蘋果

眉 眉批︰拋漿果,得銀鮭?甚可疑?『反身吹燃燄』心欲何為?『顱內火』,林中之榛有何益?何事『切剝』榛嫩枝?哪處飛來了『白娥』?意念藏心底,時流往復 反,意象難分明,誰知他說的是過去還是未來!若講『命中注定』,所謂伊人又豈該在『夢之鄉』 !怕卻是『當面錯過』!!那將怎能夠不為著此『呼喚』,去漂泊天之涯地之角的呢??

─── 《【白金西】時回流反

 

當我們閱讀一篇文章,常會發現某些句子的詞義隨著『上下文』變化 ?因此朗讀這篇文章時,聲調不得不隨之合意轉改!

那『文轉音』程式將如何吟詠

葉慈之漂泊的安格絲之歌

呢??

更別說『文法』也可以時遷的哩!!

Long time no see

Long time no see,是一句以英語組成的問候短句,譯為「好久不見 」。然而,「Long time no see」這種寫法嚴格來說並不符合英語語法規則,這個短句也並非源自英國或其他以英語為母語的地區,而是一句混雜英語和其他外語成分的皮欽英語[1] ,在華人族群和北美洲原住民族群中特別常見。

起源

根據牛津英語字典所記載,「long time no see」這一短句最早收錄在美國陸軍上尉卓爾能(W. F. Drannan)所著的《平原上的三十一年》(31 Years on Plain)一書中, 根據書中的描述,一名男性印第安人用不太純熟的英語向旁白員打招呼:「Good mornin. Long time no see you.」[1](早安,很久沒有見到你了,其中Good mornin為「Good Morning」漏掉尾音「g」的誤讀)。這句對白某程度上也反映了北美洲原住民對英語特有的運用。

另一方面,這個短句也可能最先源自洋涇浜英語,即是一種便於中國人和外來英語使用者的溝通方式。「long time no see」 在含義及語法結構上和中文「好久不見 」(Hǎojiǔ bújiàn)相似。在英語表達上,詞性名詞的中文「見」字被英文動詞「See」所頂替了。

「long time no see」大約在19世紀末由大批移民美國的華籍勞工的使用而成為了一個美式英語短句。 其後隨著英美之間的商業和海事往來而進入了英式英語的領域。其他同樣因此而進入英式英語詞彙的洋涇浜英語還有「no can do」(不能做)和 「chop chop!」(趕快!)[2]

 

音聲情文難以割裂,文法語意鎔鑄一爐,不得不回反者耶??!!

就讓我們安裝用『派生』寫的『自然語言工具箱』   Natural Language Toolkit , 玩味一下『科技』之於『人文』!

Installing NLTK

‧Install Setuptools: http://pypi.python.org/pypi/setuptools
‧Install Pip: run sudo easy_install pip
※Install Numpy (optional): run sudo pip install -U numpy
‧Install NLTK: run sudo pip install -U nltk
‧Test installation: run python then type import nltk

思索『人機界面』的未來!!

Natural Language Toolkit

NLTK is a leading platform for building Python programs to work with human language data. It provides easy-to-use interfaces to over 50 corpora and lexical resources such as WordNet, along with a suite of text processing libraries for classification, tokenization, stemming, tagging, parsing, and semantic reasoning, and an active discussion forum.

Thanks to a hands-on guide introducing programming fundamentals alongside topics in computational linguistics, NLTK is suitable for linguists, engineers, students, educators, researchers, and industry users alike. NLTK is available for Windows, Mac OS X, and Linux. Best of all, NLTK is a free, open source, community-driven project.

NLTK has been called “a wonderful tool for teaching, and working in, computational linguistics using Python,” and “an amazing library to play with natural language.”

Natural Language Processing with Python provides a practical introduction to programming for language processing. Written by the creators of NLTK, it guides the reader through the fundamentals of writing Python programs, working with corpora, categorizing text, analyzing linguistic structure, and more. The book is being updated for Python 3 and NLTK 3. (The original Python 2 version is still available at http://nltk.org/book_1ed.)

─── 摘自《W!o 的派生‧十日談之《十》

 

 

 

 

 

 

 

 

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

1878 年大發明家愛迪生寫下

It has been just so in all of my inventions. The first step is an intuition, and comes with a burst, then difficulties arise — this thing gives out and [it is] then that “Bugs” — as such little faults and difficulties are called — show themselves and months of intense watching, study and labor are requisite before commercial success or failure is certainly reached.

上文中 bugs 是用小昆蟲來指小瑕疵!為什麼呢?不得而知。至於『除蟲』debugging 的由來,就像『黏在繼電器上的飛蛾』一說,也許是故事裡的事,但又何必在意那麼多,相信能有什麼不好呢?難道說人不是因夢想而偉大,是一根會思考的蘆葦。這是 1946 的 伊尼亞克 ENIAC 世界上第一台通用型計算機,完全的圖靈機

Eniac

 

為什麼從『錯誤』開始談起呢?對寫程式的人來說,『除錯』是常態 。不要害怕『犯錯』,把錯誤看成『敵友』── 唱反調的朋友,它能糾正不清的思慮,改進不明的理解。如果能以『不二過』為圭臬,你將能學的更快更好。

中國古代沒有標點符號,卻有句讀之學,把文本斷句加上圈點,以此確定文意。舉例來說︰

『下雨天留客天天留我不留』這個文本,可以有多種句讀,文意各不相同。

下雨天,留客天;天、留我不留。
下雨,天留客,天天留;我不留。
下雨天,留客;天天留我!不留。

─── 《除蟲!除錯?終端機。

 

姑且不論『情緒』會改變『發音聲調』高低大小!

難到『字詞句讀』不會?

下雨天,留客天;天留,我不留。

比之

是行不行?或是為不為??》文本所說

《施氏食獅史》︰

據說台北的『天母』來自閩南語的『聽哞』ㄊㄧㄤㄚ‧ㄇㄛˊ。如果有人唸唸語言學家趙元任先生的

施氏食獅史》︰

石室詩士施氏,嗜獅,誓食十獅。施氏時時適市視獅。十
時,適十獅適市。是時,適施氏適市。氏視是十獅,恃矢
勢,使是十獅逝世。氏拾是十獅屍, 適石室。石室濕,氏
使侍拭石室。石室拭,氏始試食是十獅。食時,始識是十
獅,實十石獅屍 。試釋是事。

………

 

上篇測試

‧ This is a book.

‧ This is a good book!

‧ This is really a good book ?

 

不過小菜一碟也!!

如人飲水之事,莫問作者感覺哩??

pi@raspberrypi:~ pico2wave -w s1.wav "This is a book." && aplay s1.wav Playing WAVE 's1.wav' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono  pi@raspberrypi:~ pico2wave -w s2.wav "This is a good book!" && aplay s2.wav
Playing WAVE 's2.wav' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono

pi@raspberrypi:~ pico2wave -w s3.wav "This is really a good book?" && aplay s3.wav Playing WAVE 's3.wav' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono pi@raspberrypi:~

 

因著尊重著作權之故,僅列文件之名

 

,還是請讀者自行參照的吧◎

Latest commit 0b59029 Feb 5, 2014 @DougGore DougGore Initial checkin

 

 

 

 

 

 

 

 

輕。鬆。學。部落客