mirror of
https://github.com/SqrtMinusOne/sqrtminusone.github.io.git
synced 2025-12-11 00:03:02 +03:00
deploy: 5f0178d5ff
This commit is contained in:
parent
c830cdc282
commit
21b8b6b6d4
6 changed files with 39 additions and 8 deletions
|
|
@ -928,16 +928,14 @@
|
|||
</span></span></span><span style="display:flex;"><span><span style="color:#ba2121">^Apps^
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#ba2121">_t_: Terminal (Alacritty)
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#ba2121">_b_: Browser (Firefox)
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#ba2121">_v_: VK
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#ba2121">_s_: Slack
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#ba2121">_e_: Telegram
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#ba2121">_d_: Discord
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#ba2121">"</span>
|
||||
</span></span><span style="display:flex;"><span> (<span style="color:#ba2121">"t"</span> (<span style="color:#008000">lambda</span> () (<span style="color:#008000">interactive</span>) (<span style="color:#19177c">my/run-in-background</span> <span style="color:#ba2121">"alacritty"</span>)))
|
||||
</span></span><span style="display:flex;"><span> (<span style="color:#ba2121">"b"</span> (<span style="color:#008000">lambda</span> () (<span style="color:#008000">interactive</span>) (<span style="color:#19177c">my/run-in-background</span> <span style="color:#ba2121">"firefox"</span>)))
|
||||
</span></span><span style="display:flex;"><span> (<span style="color:#ba2121">"v"</span> (<span style="color:#008000">lambda</span> () (<span style="color:#008000">interactive</span>) (<span style="color:#19177c">my/run-in-background</span> <span style="color:#ba2121">"vk"</span>)))
|
||||
</span></span><span style="display:flex;"><span> (<span style="color:#ba2121">"s"</span> (<span style="color:#008000">lambda</span> () (<span style="color:#008000">interactive</span>) (<span style="color:#19177c">my/run-in-background</span> <span style="color:#ba2121">"slack-wrapper"</span>)))
|
||||
</span></span><span style="display:flex;"><span> (<span style="color:#ba2121">"e"</span> (<span style="color:#008000">lambda</span> () (<span style="color:#008000">interactive</span>) (<span style="color:#19177c">my/run-in-background</span> <span style="color:#ba2121">"flatpak run org.telegram.desktop"</span>)))
|
||||
</span></span><span style="display:flex;"><span> (<span style="color:#ba2121">"e"</span> (<span style="color:#008000">lambda</span> () (<span style="color:#008000">interactive</span>) (<span style="color:#19177c">my/run-in-background</span> <span style="color:#ba2121">"telegram-desktop"</span>)))
|
||||
</span></span><span style="display:flex;"><span> (<span style="color:#ba2121">"d"</span> (<span style="color:#008000">lambda</span> () (<span style="color:#008000">interactive</span>) (<span style="color:#19177c">my/run-in-background</span> <span style="color:#ba2121">"flatpak run com.discordapp.Discord"</span>))))
|
||||
</span></span></code></pre></div><h4 id="locking-up">Locking up</h4>
|
||||
<p>Run i3lock.</p>
|
||||
|
|
@ -3891,7 +3889,7 @@
|
|||
<div class="highlight"><pre tabindex="0" style=";-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-scheme" data-lang="scheme"><span style="display:flex;"><span>(<span style="color:#00f">action</span> <span style="color:#19177c">'shepherd</span> <span style="color:#19177c">'daemonize</span>)
|
||||
</span></span></code></pre></div><p>Run services</p>
|
||||
<div class="highlight"><pre tabindex="0" style=";-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-scheme" data-lang="scheme"><span style="display:flex;"><span>(<span style="color:#008000">for-each </span><span style="color:#19177c">start</span> <span style="color:#666">'</span>(<span style="color:#19177c">mpd</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#19177c">mpd-watcher</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#19177c">sqrt-data-agent-mpd</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#19177c">mcron</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#19177c">aw-server</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#19177c">aw-watcher-afk</span>
|
||||
|
|
@ -3902,8 +3900,7 @@
|
|||
</span></span><span style="display:flex;"><span> <span style="color:#19177c">polkit-gnome</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#19177c">davmail</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#19177c">xmodmap</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#19177c">nm-applet</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#19177c">sqrt-data</span>))
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#19177c">nm-applet</span>))
|
||||
</span></span></code></pre></div><h2 id="guix-settings">Guix settings</h2>
|
||||
<p>Other desktop programs I use are listed below.</p>
|
||||
<table>
|
||||
|
|
@ -4020,6 +4017,11 @@
|
|||
<td>bluez</td>
|
||||
<td>Provides bluetoothctl</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>desktop-misc</td>
|
||||
<td>telegram-desktop</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><a id="code-snippet--packages"></a></p>
|
||||
|
|
|
|||
|
|
@ -75,6 +75,9 @@
|
|||
<blockquote>
|
||||
<p>One day we won’t hate one another, no young boy will march to war and I will clean up my Emacs config. But that day isn’t today.</p>
|
||||
</blockquote>
|
||||
<ul>
|
||||
<li>Me, <span class="timestamp-wrapper"><span class="timestamp"><2021-05-27 Thu 17:35> </span></span> in commit 93a0573 T_T</li>
|
||||
</ul>
|
||||
<h2 id="introduction">Introduction</h2>
|
||||
<p>My configuration of <a href="https://www.gnu.org/software/emacs/">GNU Emacs</a>, an awesome <del>text editor</del> program that can do almost anything.</p>
|
||||
<p>At the moment of this writing, this “almost anything” includes:</p>
|
||||
|
|
@ -5975,7 +5978,33 @@ Emacs is also particularly good at writing Lisp code, e.g. Clojure, Common Lisp,
|
|||
<p>After that, <code>M-x subed-mpv-toggle-pause</code> should start the playback, which you can control by moving the cursor in the buffer.</p>
|
||||
<p>You can also run <code>M-x subed-toggle-sync-point-to-player</code> (<code>C-c .</code>) to toggle syncing the point in the buffer to the currently played subtitle (this automatically gets disabled when you switch buffers).</p>
|
||||
<p>Running <code>M-x subed-toggle-sync-player-to-point</code> (<code>C-c ,</code>) does the opposite, i.e. sets the player position to the subtitle under point. These two functions are useful since the MPV window controls aren’t available.</p>
|
||||
<h5 id="some-observations">Some observations</h5>
|
||||
<h5 id="running-it-for-random-files">Running it for random files</h5>
|
||||
<p>Apparently I also need to run whisper for random files from the Internet.</p>
|
||||
<div class="highlight"><pre tabindex="0" style=";-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-emacs-lisp" data-lang="emacs-lisp"><span style="display:flex;"><span>(<span style="color:#008000">defun</span> <span style="color:#19177c">my/whisper-url</span> (<span style="color:#19177c">url</span> <span style="color:#19177c">file-name</span> <span style="color:#19177c">output-dir</span>)
|
||||
</span></span><span style="display:flex;"><span> (<span style="color:#008000">interactive</span>
|
||||
</span></span><span style="display:flex;"><span> (<span style="color:#00f">list</span> (<span style="color:#00f">read-from-minibuffer</span> <span style="color:#ba2121">"URL: "</span>)
|
||||
</span></span><span style="display:flex;"><span> (<span style="color:#00f">read-from-minibuffer</span> <span style="color:#ba2121">"File name: "</span>)
|
||||
</span></span><span style="display:flex;"><span> (<span style="color:#19177c">read-directory-name</span> <span style="color:#ba2121">"Output directory: "</span>)))
|
||||
</span></span><span style="display:flex;"><span> (<span style="color:#008000">let</span> ((<span style="color:#19177c">file-path</span>
|
||||
</span></span><span style="display:flex;"><span> (<span style="color:#00f">concat</span> <span style="color:#19177c">output-dir</span> <span style="color:#19177c">file-name</span> <span style="color:#ba2121">"."</span> (<span style="color:#19177c">file-name-extension</span> <span style="color:#19177c">url</span>))))
|
||||
</span></span><span style="display:flex;"><span> (<span style="color:#00f">message</span> <span style="color:#ba2121">"Download started"</span>)
|
||||
</span></span><span style="display:flex;"><span> (<span style="color:#19177c">request</span> <span style="color:#19177c">url</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#008000">:type</span> <span style="color:#ba2121">"GET"</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#008000">:encoding</span> <span style="color:#19177c">'binary</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#008000">:complete</span>
|
||||
</span></span><span style="display:flex;"><span> (<span style="color:#008000">cl-function</span>
|
||||
</span></span><span style="display:flex;"><span> (<span style="color:#008000">lambda</span> (<span style="color:#008000">&key</span> <span style="color:#19177c">data</span> <span style="color:#008000">&allow-other-keys</span>)
|
||||
</span></span><span style="display:flex;"><span> (<span style="color:#008000">let</span> ((<span style="color:#19177c">coding-system-for-write</span> <span style="color:#19177c">'binary</span>)
|
||||
</span></span><span style="display:flex;"><span> (<span style="color:#19177c">write-region-annotate-functions</span> <span style="color:#800">nil</span>)
|
||||
</span></span><span style="display:flex;"><span> (<span style="color:#19177c">write-region-post-annotation-function</span> <span style="color:#800">nil</span>))
|
||||
</span></span><span style="display:flex;"><span> (<span style="color:#00f">write-region</span> <span style="color:#19177c">data</span> <span style="color:#800">nil</span> <span style="color:#19177c">file-path</span> <span style="color:#800">nil</span> <span style="color:#008000">:silent</span>))
|
||||
</span></span><span style="display:flex;"><span> (<span style="color:#00f">message</span> <span style="color:#ba2121">"Conversion started"</span>)
|
||||
</span></span><span style="display:flex;"><span> (<span style="color:#19177c">my/invoke-whisper</span> <span style="color:#19177c">file-path</span> <span style="color:#19177c">output-dir</span>)))
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#008000">:error</span>
|
||||
</span></span><span style="display:flex;"><span> (<span style="color:#008000">cl-function</span>
|
||||
</span></span><span style="display:flex;"><span> (<span style="color:#008000">lambda</span> (<span style="color:#008000">&key</span> <span style="color:#19177c">error-thrown</span> <span style="color:#008000">&allow-other-keys</span>)
|
||||
</span></span><span style="display:flex;"><span> (<span style="color:#00f">message</span> <span style="color:#ba2121">"Error!: %S"</span> <span style="color:#19177c">error-thrown</span>))))))
|
||||
</span></span></code></pre></div><h5 id="some-observations">Some observations</h5>
|
||||
<p>So, the functions above work for my purposes.</p>
|
||||
<p>Vosk API works much faster than Whisper. The smallest Vosk model requires ~10 times less than the playback time, and even the <code>tiny.en</code> Whisper model on my PC requires maybe 1.2x playback time.</p>
|
||||
<p>However, the quality of the output for Whisper is just so much better so I consider it to be worth the wait. Even with the <code>tiny</code> model, the transcript is almost perfect, provided that the audio is of reasonable quality.</p>
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ A few cases of literate configuration. My blog post that explains some of techni
|
|||
|
||||
<guid>https://sqrtminusone.xyz/configs/emacs/</guid>
|
||||
<description>One day we won&rsquo;t hate one another, no young boy will march to war and I will clean up my Emacs config. But that day isn&rsquo;t today.
|
||||
Introduction My configuration of GNU Emacs, an awesome text editor program that can do almost anything.
|
||||
Me, &lt;2021-05-27 Thu 17:35&gt; in commit 93a0573 T_T Introduction My configuration of GNU Emacs, an awesome text editor program that can do almost anything.
|
||||
At the moment of this writing, this &ldquo;almost anything&rdquo; includes:
|
||||
Writing code. With LSP &amp; Co Emacs is as good as many IDEs, and is certainly on par with editors like VS Code.</description>
|
||||
</item>
|
||||
|
|
|
|||
BIN
stats/all.png
BIN
stats/all.png
Binary file not shown.
|
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 117 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 68 KiB |
Loading…
Add table
Reference in a new issue