google-sheet2Html

/*! * * Google Sheets To HTML v0.9a * * To use, simply replace the "tq?key=" value in the * URL below with your own unique Google document ID * * The Google document's sharing must be set to public * */ google.load('visualization', '1', { packages: ['table'] }); var visualization; function drawVisualization() { var query = new google.visualization.Query('https://spreadsheets.google.com/tq?key=https://docs.google.com/spreadsheets/d/1-vUEZ9tae5C_OXzSi0dQPWwUrO3H5S-gImB5afFgqDg/edit?usp=sharing'); query.setQuery('SELECT A, B, C, D label A "Duration", B "Song", C "Requested By", D "URL"'); query.send(handleQueryResponse); } function handleQueryResponse(response) { if (response.isError()) { alert('There was a problem with your query: ' + response.getMessage() + ' ' + response.getDetailedMessage()); return; } var data = response.getDataTable(); visualization = new google.visualization.Table(document.getElementById('table')); visualization.draw(data, { legend: 'bottom' }); } google.setOnLoadCallback(drawVisualization);

Wednesday, June 1, 2016

Speex codec


Speex codec

speex codec เป็น free software open-source และ rayalty-free
ค่า บิทเรทbit-rate 2.15 kpbs - 44 kbps
ใช้ได้หลาย Platforms ทั้ง X86, MacOSX, Linux
ดูรายละเอียดได้จาก






สำหรับผู้ที่ต้องการใช้ภาษา python ให้ดูวิธีีติดตั้ง จาก
ตัวอย่างการใช้งาน


ใน Bash
การใช้งาน speexenc เป็น utility สำหรับสร้างข้อมูลจาก ไฟล์นามสกุล PCM หรือwave fileมีรูปแบบดังนี้

speexenc [options] input_file output_file

Option ที่เลือกใช้ได้

narrowband (-n) Tell Speex to treat the input as narrowband (8 kHz). This is the default
wideband (-w) Tell Speex to treat the input as wideband (16 kHz)
ultra-wideband (-u) Tell Speex to treat the input as “ultra-wideband” (32 kHz)
quality n Set the encoding quality (0-10), default is 8
bitrate n Encoding bit-rate (use bit-rate n or lower)
vbr Enable VBR (Variable Bit-Rate), disabled by default
abr n Enable ABR (Average Bit-Rate) at n kbps, disabled by default
vad Enable VAD (Voice Activity Detection), disabled by default
dtx Enable DTX (Discontinuous Transmission), disabled by defa
ult
nframes n Pack n frames in each Ogg packet (this saves space at low bit-r
ates)
comp n Set encoding speed/quality tradeoff. The higher the value o
f n, the slower the encoding (default is 3)
-V Verbose operation, print bit-rate currently in use
help (-h) Print the help
version (-v) Print version information


แต่ที่นาสนใจคือทำงานเมื่อ มีเสียง คล้ายกับ ไมค์ Vox ที่ใช้ใน Echo link
vad Enable VAD (Voice Activity Detection)


ในส่วนการถอดรหัส มีรูปแบบ คำสั่งในการใช้งานดังนี้

speexdec [options] speex_file [output_file]

output_file จะส่งไปยัง sound card เพื่อเล่นเสียงออกมา
มี option ดังนี้
enh enable post-filter (default)
no-enh disable post-filter
force-nb Force decoding in narrowband
force-wb Force decoding in wideband
force-uwb Force decoding in ultra-wideband
mono Force decoding in mono
stereo Force decoding in stereo
rate n Force decoding at n Hz sampling rate
packet-loss n Simulate n % random packet loss
-V Verbose operation, print bit-rate currently in use
help (-h) Print the help
version (-v) Print version information

No comments:

Post a Comment