') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); })(); GitHub - dotmain/WebSynthesis: Synthesis Powered Thinking Web · GitHub
Skip to content

Latest commit

History

28 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

WebSynthesis

Synthesis Powered Thinking Web Demo

Procedural thinking web synthesis demo for alphasep's vosk-api, https://github.com/alphacep/vosk-api/tree/master/nodejs.

For demo purpose only - NOT FOR COMMERCIAL USE -

A thinking web synthesis demo.

For commercial intelligent and thinking machine non entertainment purpose licenses, thinking machine and thinking web synthesis licenses, intelligent machine engineering or congitive and synthetic intelligence consulting, please contact me. discord: .gg/qEaspkC

Intelligent and thinking machines, along with thinking web and machine synthesis and synthetic intelligence are a mainvolume / planetever protected intellectual property.

@mainvolume mainvolume.com planetever.com

We are gonna license synthesis to revolutionize machines.

Build info: Linux 20.04, arm64, 64bit

.a demo purpose thinking web synthesis license. property of mainvolume, by m41n1485, for planetever. xxxxi.

#This is how its been built: after installation process for vosk-api, along with nodejs builds according to instructions.

step 1:

The build tested with node-0.10.15, node-0.12 is not yet supported by swig. You need swig of newest version 4.0.1

this is based on vosk-api's docker build: The outline of the build is here. https://github.com/alphacep/vosk-api/blob/master/travis/Dockerfile.manylinux#L26


mkdir opt
$ sudo apt install wget automake autoconf libtool cmake
cd opt \
&& wget -O swig-4.0.1.tar.gz https://sourceforge.net/projects/swig/files/swig/swig-4.0.1/swig-4.0.1.tar.gz/download \
&& tar xf swig-4.0.1.tar.gz \
&& cd swig-4.0.1 \
&& ./configure --prefix=/usr && make -j 10 && sudo make install \
&& cd .. \
&& rm -rf swig-4.0.1.tar.gz swig-4.0.1
Step 2:
cd opt \
&& git clone -b main --single-branch https://github.com/dotmain/kaldi \
&& cd opt/kaldi/tools \
&& git clone -b v0.3.13 --single-branch https://github.com/xianyi/OpenBLAS \
&& git clone -b v3.2.1 --single-branch https://github.com/alphacep/clapack \
&& make -C OpenBLAS ONLY_CBLAS=1 DYNAMIC_ARCH=1 TARGET=NEHALEM USE_LOCKING=1 USE_THREAD=0 all \
&& make -C OpenBLAS PREFIX=$(pwd)/OpenBLAS/install sudo install \
&& mkdir -p clapack/BUILD && cd clapack/BUILD && sudo cmake .. && sudo make -j 10 && find . -name "*.a" | xargs cp -t ../../OpenBLAS/install/lib \
&& cd /opt/kaldi/tools \
&& git clone --single-branch https://github.com/alphacep/openfst openfst \
&& cd openfst \
&& autoreconf -i \
&& CFLAGS="-g -O3" ./configure --prefix=/home/development/mother-server/opt/kaldi/tools/openfst --enable-static --enable-shared --enable-far --enable-ngram-fsts --enable-lookahead-fsts --with-pic --disable-bin \
&& make -j 10 && sudo make install \
&& cd opt/kaldi/src \
&& ./configure --mathlib=OPENBLAS_CLAPACK --shared --use-cuda=no \
&& sed -i 's:-msse -msse2:-msse -msse2:g' kaldi.mk \
&& sed -i 's: -O1 : -O3 :g' kaldi.mk \
&& sudo make -j $(nproc) online2 lm rnnlm \
&& find opt/kaldi -name "*.o" -exec rm {} \;
$ npm install --kaldi_root=/home/user/kaldi

Updated build scripts:

https://github.com/alphacep/vosk-api/tree/master/travis For Windows and Raspberry Pi we recommend cross-build with mingw and corresponding ARM toolchain. See docker files for details.

Then cd to project folder:

in the WebSynthesis project folder

$ wget https://alphacephei.com/kaldi/models/vosk-model-small-en-us-0.15.zip
$ unzip vosk-model-small-en-us-0.15.zip
$ mv vosk-model-small-en-us-0.15 model
node test-syntesis.js

watch out for errors. THS CODE, DESIGN, CONCEPTS AND PRODUCTS MAY NOT BE USED FOR COMMERCIAL PURPOSES FOR MACHINE INTELLIGENCE IN ANY FORM. Y

About

Synthesis Powered Thinking Web

Resources

Stars

4 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages