<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>text-to-speech on S Anand</title>
    <link>https://www.s-anand.net/blog/tag/text-to-speech/</link>
    <description>Recent content in text-to-speech on S Anand</description>
    <generator>Hugo -- 0.164.0</generator>
    <language>en-us</language>
    <lastBuildDate>Sun, 02 Nov 2025 05:12:34 +0000</lastBuildDate>
    <atom:link href="https://www.s-anand.net/blog/tag/text-to-speech/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>OpenAI TTS cost</title>
      <link>https://www.s-anand.net/blog/openai-tts-cost/</link>
      <pubDate>Sun, 02 Nov 2025 05:12:32 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/openai-tts-cost/</guid>
      <description>&lt;p&gt;&lt;img alt=&#34;OpenAI TTS cost&#34; loading=&#34;lazy&#34; src=&#34;https://www.s-anand.net/blog/assets/doodle.webp&#34;&gt;&lt;/p&gt;
&lt;p&gt;The OpenAI &lt;a href=&#34;https://platform.openai.com/docs/guides/text-to-speech&#34;&gt;text-to-speech&lt;/a&gt; cost documentation is confusing.&lt;/p&gt;
&lt;p&gt;As of 2 Nov 2025:&lt;/p&gt;
&lt;ul class=&#34;wp-block-list&#34;&gt;
&lt;li&gt;&lt;a href=&#34;https://platform.openai.com/docs/models/gpt-4o-mini-tts&#34;&gt;GPT-4o mini TTS&lt;/a&gt; costs $0.60 / MTok input and $12.00 / MTok audio output according to the &lt;a href=&#34;https://platform.openai.com/docs/models/gpt-4o-mini-tts&#34;&gt;model page&lt;/a&gt; and the &lt;a href=&#34;https://platform.openai.com/docs/pricing&#34;&gt;pricing page&lt;/a&gt;. They also estimate this to be ~1.5c per minute - both for input and output. It supports up to 2,000 tokens input.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://platform.openai.com/docs/models/tts-1&#34;&gt;TTS-1&lt;/a&gt; costs $15 / MTok speech generated according to the &lt;a href=&#34;https://platform.openai.com/docs/models/tts-1&#34;&gt;model page&lt;/a&gt; but the &lt;a href=&#34;https://platform.openai.com/docs/pricing&#34;&gt;pricing page&lt;/a&gt; says it&#39;s $15 / MChars. No estimate per minute is provided. Is supports up to 4,096 characters input.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://platform.openai.com/docs/models/tts-1-hd&#34;&gt;TTS-1 HD&lt;/a&gt; is twice as expensive as TTS-1&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I wanted to find the approximate total cost for a typical text input measured per character and token.&lt;/p&gt;
&lt;p&gt;I converted this &lt;a href=&#34;podcast.txt&#34;&gt;podcast&lt;/a&gt; with 4,096 ASCII characters and 877 tokens on &lt;a href=&#34;https://github.com/openai/tiktoken&#34;&gt;o200k_base&lt;/a&gt; using:&lt;/p&gt;
&lt;p&gt;I ran:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;curl https://api.openai.com/v1/audio/speech &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -H &lt;span class=&#34;s2&#34;&gt;&amp;#34;Authorization: Bearer &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$OPENAI_API_KEY&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -H &lt;span class=&#34;s2&#34;&gt;&amp;#34;Content-Type: application/json&amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -d &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;jq -n --arg text &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;cat podcast.txt&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;{
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;    model: &amp;#34;tts-1&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;    voice: &amp;#34;coral&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;    input: $text
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;  }&amp;#39;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  --output tts-1.mp3
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This took 46 seconds to generate and produced a 5.1 MB MP3 file (256 seconds)&lt;/p&gt;
&lt;p&gt;To measure the cost, I ran:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;curl &lt;span class=&#34;s2&#34;&gt;&amp;#34;https://api.openai.com/v1/organization/costs?start_time=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;date -d &lt;span class=&#34;s1&#34;&gt;&amp;#39;1 day ago&amp;#39;&lt;/span&gt; +%s&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;amp;project_ids=&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$PROJECT_ID&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;amp;group_by=line_item&amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -H &lt;span class=&#34;s2&#34;&gt;&amp;#34;Authorization: Bearer &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$OPENAI_ADMIN_KEY&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -H &lt;span class=&#34;s2&#34;&gt;&amp;#34;Content-Type: application/json&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This cost: &lt;strong&gt;USD 0.061425&lt;/strong&gt;. Then I ran:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;curl https://api.openai.com/v1/audio/speech &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -H &lt;span class=&#34;s2&#34;&gt;&amp;#34;Authorization: Bearer &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$OPENAI_API_KEY&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -H &lt;span class=&#34;s2&#34;&gt;&amp;#34;Content-Type: application/json&amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -d &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;jq -n --arg text &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;cat podcast.txt&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;{
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;    model: &amp;#34;gpt-4o-mini-tts&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;    voice: &amp;#34;coral&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;    input: $text
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;  }&amp;#39;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  --output gpt-4o-mini-tts.mp3
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This took 44 seconds to generate and produced a 4.3 MB MP3 file (268 seconds).&lt;/p&gt;
&lt;p&gt;When I ran the admin API call again, the costs did not reflect for 5 minutes. So I ran it the GPT-4o mini TTS call again with the same input. This took 44 seconds to generate a 4.3 MB MP3 file. When I ran the admin API call again, the total cost for &lt;strong&gt;the 2 requests&lt;/strong&gt; was: &lt;strong&gt;USD 0.12942&lt;/strong&gt; audio output and USD 0.0010524 input.&lt;/p&gt;
&lt;p&gt;I also checked for TTS-1 HD. Here are the costs in USD:&lt;/p&gt;
&lt;figure class=&#34;wp-block-table&#34;&gt;&lt;table class=&#34;has-fixed-layout&#34;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Model&lt;/th&gt;&lt;th class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;$ / MTok&lt;/th&gt;&lt;th class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;$ / MChars&lt;/th&gt;&lt;th class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;$ / hour&lt;/th&gt;&lt;th class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;Time (s)&lt;/th&gt;&lt;th class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;Audio (s)&lt;/th&gt;&lt;th class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;Cost $&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;GPT-4o mini TTS&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;74.4&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;15.9&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;0.876&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;46&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;268&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;0.0652&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;TTS-1&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;70.0&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;15.0&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;0.864&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;44&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;256&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;0.0614&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;TTS-1 HD&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;140.0&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;30.0&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;1.728&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;62&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;257&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;0.1228&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/figure&gt;
&lt;p&gt;The GPT-4o mini TTS audio output cost was USD 0.06471 for the input of 877 tokens, i.e. $73.8 / MTok. Since the actual cost is $12 / MTok, this is a 6.15x multiplier. I guess &lt;strong&gt;1 input text token produces ~6 output audio tokens&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;In terms of quality:&lt;/p&gt;
&lt;ul class=&#34;wp-block-list&#34;&gt;
&lt;li&gt;GPT-4o mini TTS: Very slightly robotic. Looser interpretation of text (e.g. says &#34;October&#34; when I write &#34;Oct&#34;).&lt;/li&gt;
&lt;li&gt;TTS-1: Natural. Strict interpretation of text.&lt;/li&gt;
&lt;li&gt;TTS-1 HD: Very slightly more natural. Strict interpretation of text.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;I will likely use TTS-1 for now&lt;/strong&gt; given the cost difference is small and the quality is good enough.&lt;/p&gt;
&lt;hr class=&#34;wp-block-separator has-alpha-channel-opacity&#34;/&gt;
&lt;p&gt;Incidentally, the &lt;a href=&#34;https://platform.openai.com/docs/api-reference/usage/audio_speeches&#34;&gt;usage API&lt;/a&gt; did not show an GPT 4o mini TTS line items even after 20 minutes.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;curl &lt;span class=&#34;s2&#34;&gt;&amp;#34;https://api.openai.com/v1/organization/usage/audio_speeches?start_time=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;date -d &lt;span class=&#34;s1&#34;&gt;&amp;#39;1 day ago&amp;#39;&lt;/span&gt; +%s&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;amp;project_ids=&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$PROJECT_ID&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;amp;group_by=model&amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -H &lt;span class=&#34;s2&#34;&gt;&amp;#34;Authorization: Bearer &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$OPENAI_ADMIN_KEY&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -H &lt;span class=&#34;s2&#34;&gt;&amp;#34;Content-Type: application/json&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Things I Learned - 25 May 2025</title>
      <link>https://www.s-anand.net/blog/things-i-learned-25-may-2025/</link>
      <pubDate>Sun, 25 May 2025 00:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/things-i-learned-25-may-2025/</guid>
      <description>&lt;p&gt;This week, I learned:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://oxc.rs/docs/guide/usage/linter&#34;&gt;oxlint&lt;/a&gt; is a fast &lt;a href=&#34;https://eslint.org/&#34;&gt;eslint&lt;/a&gt; alternative written in Rust. It supports &lt;em&gt;most&lt;/em&gt; but not all eslint rules. &lt;a href=&#34;https://github.com/oxc-project/oxlint-migrate&#34;&gt;Migration&lt;/a&gt; can be automated but not all rules are migrated (which may be OK). Best for new projects.&lt;/li&gt;
&lt;li&gt;TTS typically costs $1/hour now. Gemini 2.5 Flash Preview TTS, Gemini 2.5 Pro Preview TTS, GPT 4o TTS, and GPT 4o Mini TTS are the current best-in-class text-to-speech models from the mainstream LLM providers. Assuming ~175 words per minute and 1 token ≈ ¾ words, 1 hour of speech ~ 10,300 words/hr ~ 13,800 input tokens ~ 75,000 audio tokens, it costs:
&lt;ul&gt;
&lt;li&gt;Gemini 2.5 Flash Preview TTS ($0.50/1 M input, $10.00/1 M output): ~$0.8 per hour&lt;/li&gt;
&lt;li&gt;GPT-4o-mini-TTS ($0.60/1 M input, $12.00/1 M output): ~$0.9/hour&lt;/li&gt;
&lt;li&gt;Gemini 2.5 Pro Preview TTS ($1.00/1 M input, $20.00/1 M output): ~$1.5 per hour&lt;/li&gt;
&lt;li&gt;GPT-4o-TTS (known as gpt-4o-audio-preview, $2.50/1 M input, $80/1 M output): ~$6.0/hour&lt;/li&gt;
&lt;li&gt;This is comparable to the earlier OpenAI Standard TTS ($0.75), OpenAI HD TTS ($1.5), Google Neural2 ($0.8). ElevenLabs Pro costs ~$6/hr.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;My preferred way to remove passwords from a PDF is via pikepdf: &lt;code&gt;uv run --with pikepdf python -c &#39;import pikepdf, sys; pdf = pikepdf.open(sys.argv[1], password=sys.argv[2], allow_overwriting_input=True); pdf.save()&#39; filename.pdf password&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Learnings on &lt;a href=&#34;https://www.pnas.org/doi/10.1073/pnas.2218834120#supplementary-materials&#34;&gt;the mortality of states&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Steep early rise in vulnerability&lt;/strong&gt;. Risk of nation states dying (hazard curve) climbs quickly during roughly the first ~200 years of a state’s life.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Risk then flattens out&lt;/strong&gt;. After that &amp;ldquo;middle-age,&amp;rdquo; the chance of termination stops increasing; hardy states can survive for many centuries.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pattern is global&lt;/strong&gt;. Same shape appears in Europe, the Americas, and East Asia, including the well-known ~300-year upper limit of many Chinese dynasties.&lt;/li&gt;
&lt;li&gt;Resilience erodes due to &amp;ldquo;slow&amp;rdquo; variables that grow quietly.
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Environmental degradation&lt;/strong&gt;. Soil exhaustion, deforestation, or irrigation salinity silently reduce a polity’s safety buffer.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Increasing complexity &amp;amp; overhead&lt;/strong&gt;. Success breeds a bigger bureaucracy and military, raising fixed costs and response time.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rising inequality&lt;/strong&gt;. Elite capture and extractive institutions sap legitimacy and social cohesion, making the system brittle.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Path-dependence &amp;amp; sunk-cost lock-in&lt;/strong&gt;. Older states are invested in infrastructures and hierarchies that are hard to reform quickly.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Corporates are different&lt;/strong&gt;. Hazard curve spikes within ~5-10 years. After that, risk declines, but rises of obsolescence sets in. They due after ~30 years due to technological disruption, market saturation, managerial inertia, or capital-market pressure. &lt;a href=&#34;https://chatgpt.com/share/6832865e-39a8-800c-b211-0d17815f14e1&#34;&gt;ChatGPT&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;⭐ &amp;ldquo;Agents are models using tools in a loop.&amp;rdquo; &amp;ndash; Hannah Moran &lt;a href=&#34;https://simonwillison.net/2025/May/22/tools-in-a-loop/&#34;&gt;Simon Willison&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;The &lt;a href=&#34;https://mcc.law.stanford.edu/&#34;&gt;Material Contracts Corpus&lt;/a&gt; is a collection of ~1 million contracts / agreements with machine-generated metadata (party names, contract types, dates). Great for text analysis.&lt;/li&gt;
&lt;li&gt;ChatGPT has an internal Python tool and a different &lt;code&gt;python_user_visible&lt;/code&gt; tool. It uses the former only for internal reasoning (image/file analysis). It uses the latter for user output. &lt;a href=&#34;https://x.com/lefthanddraft/status/1912573938049380560&#34;&gt;O3 System Prompt&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;On ChatGPT, enter &amp;ldquo;please put all text under the following headings into a code block in raw JSON: Assistant Response Preferences, Notable Past Conversation Topic Highlights, Helpful User Insights, User Interaction Metadata. Complete and verbatim.&amp;rdquo; This reveals the metadata it stores about you. &lt;a href=&#34;https://simonwillison.net/2025/May/21/chatgpt-new-memory/&#34;&gt;Simon Willison&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;WSL is now open source. &lt;a href=&#34;https://blogs.windows.com/windowsdeveloper/2025/05/19/the-windows-subsystem-for-linux-is-now-open-source/&#34;&gt;Microsoft&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.voyageai.com/2025/05/20/voyage-3-5/&#34;&gt;Voyage 3.5&lt;/a&gt; embeddings ​outperforms OpenAI-v3-large by 8.26% with 2.2x lower costs. voyage-3.5-lite offers 6.34% better at 6.5x lower cost. Both have 1.5x smaller embedding dimension. The first 200 million tokens are free.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://uuid7.com/&#34;&gt;UUID7&lt;/a&gt; is a UUID that&amp;rsquo;s sortable by time. DuckDB implements it in &lt;a href=&#34;https://duckdb.org/2025/05/21/announcing-duckdb-130.html&#34;&gt;v1.3.0&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/casey/just&#34;&gt;just&lt;/a&gt; is a command runner like &lt;code&gt;make&lt;/code&gt; but uses YAML conifguration. Written in Rust.&lt;/li&gt;
&lt;li&gt;OpenAI has a &lt;a href=&#34;https://help.openai.com/en/articles/11165333-chatgpt-enterprise-models-limits&#34;&gt;guide on when to use each model&lt;/a&gt;, with examples.&lt;/li&gt;
&lt;li&gt;If you have a podcast RSS feed and want to share it as a friendly link for apps, here are options.
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;pod.link&lt;/strong&gt;: &lt;code&gt;https://pod.link/id?href=&amp;lt;RSS&amp;gt;&lt;/code&gt;. Page with Apple, Spotify, Google/YouTube Music, Pocket Casts, Overcast; auto-detects installed app; free, vanity slugs, GA-ID, cache-clear; run by Spotify&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SubscribeOnAndroid&lt;/strong&gt;: &lt;code&gt;https://subscribeonandroid.com/&amp;lt;RSS&amp;gt;&lt;/code&gt;. Android-only intent for any compliant app (AntennaPod, Pocket Casts, etc.); tiny, ad-free fallback&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Episodes.fm&lt;/strong&gt;: &lt;code&gt;https://episodes.fm/&amp;lt;base64-RSS&amp;gt;&lt;/code&gt;. Device-detect page; remembers the app a listener chose; supports live-episode &lt;code&gt;&amp;lt;podcast:liveItem&amp;gt;&lt;/code&gt; tags&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Plink&lt;/strong&gt;: &lt;code&gt;https://plinkhq.com/i/&amp;lt;AppleID&amp;gt;?to=page&lt;/code&gt;. Deep-link redirect on mobile, landing page on desktop; free tier, vanity &lt;code&gt;plnk.to/&lt;/code&gt; URLs, built-in analytics&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Podfollow&lt;/strong&gt;: &lt;code&gt;https://podfollow.com/&amp;lt;AppleID&amp;gt;&lt;/code&gt;. Claim by RSS; free; episode links; optional web player; custom redirect rules&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Chartable SmartLinks&lt;/strong&gt;: &lt;code&gt;https://chartable.com/feeds/&amp;lt;feedID&amp;gt;/smartlinks&lt;/code&gt;. Add a trackable prefix in RSS; channel attribution, vanity slug, A/B testing&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Linkfire for Podcasts&lt;/strong&gt;: &lt;code&gt;https://linkfire.com/podcasts?url=&amp;lt;RSS&amp;gt;&lt;/code&gt;. Dashboard &amp;ldquo;Create link&amp;rdquo; flow; auto-updates new episodes; Apple Podcasts analytics; email-capture widgets&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Feature.fm&lt;/strong&gt;: &lt;code&gt;https://feature.fm/smartlinks/podcast?feed=&amp;lt;RSS&amp;gt;&lt;/code&gt;. Pixel support, retargeting campaigns; freemium tier with upgrade for custom domains&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    <item>
      <title>Things I Learned - 19 Jan 2025</title>
      <link>https://www.s-anand.net/blog/things-i-learned-19-jan-2025/</link>
      <pubDate>Sun, 19 Jan 2025 00:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/things-i-learned-19-jan-2025/</guid>
      <description>&lt;p&gt;This week, I learned:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Audio diaries are a thing. Monash University asks students to voice their learnings, share it with each other and have them give feedback. I wonder if ChatGPT diaries could become a thing, too, and LLM journalling starts helping with therapy.&lt;/li&gt;
&lt;li&gt;Regulation shows things down at colleges and hospitals. For example, patient consent is required for surgeons to learn from their own surgery videos. Unregulated sectors are far more likely to innovate.&lt;/li&gt;
&lt;li&gt;Doctors can only do so much. Air quality, where you live, etc can do more for the patient than medicines or the doctor. If doctors keep this in mind, they can be more effective.
&lt;ul&gt;
&lt;li&gt;Extending that thought, &lt;em&gt;ANYONE&lt;/em&gt; who leverages assets through holistic thinking, becomes &lt;em&gt;FAR&lt;/em&gt; more effective.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&amp;ldquo;The curriculum tells teachers what to teach. The exams tell students what to learn.&amp;rdquo; - Ronald Harden&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Stravaig&amp;rdquo; is a Scottish word. It means mindless wanderings.&lt;/li&gt;
&lt;li&gt;&amp;ldquo;The real voyage of discovery consists of not a new voyage but having new eyes&amp;rdquo; - Proust&lt;/li&gt;
&lt;li&gt;Possibility Thinking is &amp;ldquo;the willingness to see possibilities everywhere instead of limitations&amp;rdquo;. It&amp;rsquo;s an approach / mindset that can make things that seem hard possible. With LLMs, this is becoming increasingly realistic to me in many areas.&lt;/li&gt;
&lt;li&gt;What will LLMs enable that do not or cannot exist today? Rather than optimizing what exists? Something to think about.&lt;/li&gt;
&lt;li&gt;ModernBert supports embeddings and is better than text-embedding-3-small on &lt;a href=&#34;https://huggingface.co/spaces/mteb/leaderboard&#34;&gt;MTEB&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://community.brave.com/t/how-to-export-braves-browsing-history-to-another-browser/114687&#34;&gt;How to export browser history from Brave to Edge&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Go to &lt;code&gt;AppData Local &amp;gt; BraveSoftware &amp;gt; Brave-Browser &amp;gt; User Data &amp;gt; Default&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Copy &lt;code&gt;History&lt;/code&gt; and &lt;code&gt;History-journal&lt;/code&gt; into &lt;code&gt;AppData Local &amp;gt; Google &amp;gt; Chrome &amp;gt; User Data &amp;gt; Default&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;On Edge, go to &lt;code&gt;edge://settings/profiles/importBrowsingData&lt;/code&gt; and &lt;code&gt;Import data from Google Chrome&lt;/code&gt; and import the history.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;I switched back from Brave to Edge, mainly because Edge&amp;rsquo;s native text-to-speech and speech recognition is far better. I can use it better on my mobile.&lt;/li&gt;
&lt;li&gt;A colleague, Karthick, asked different models to apply the editing and formatting guidelines for a journal to a manuscript. (E.g. Abbreviate chapter &amp;amp; section numbers, except when a sentence begins with it. Use &amp;ldquo;1&amp;rdquo; instead of &amp;ldquo;one&amp;rdquo;, etc. except when a sentence begins with it. Things like this.) Gemini Exp 1206 seems to be the most reliable, compared with most other models.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/features/codespaces&#34;&gt;GitHub CodeSpaces&lt;/a&gt; seems to be coming up more often in my radar, but I&amp;rsquo;m yet to figure out a use for it.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://huggingface.co/spaces/Pendrokar/TTS-Spaces-Arena&#34;&gt;TTS Arena&lt;/a&gt; is a benchmark of text-to-speech models. &lt;a href=&#34;https://huggingface.co/spaces/hexgrad/Kokoro-TTS&#34;&gt;Kokoro-TTS&lt;/a&gt; is the current leader. It&amp;rsquo;s just 82M, runs on Google Colab, and sounds slightly better than OpenAI TTS.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://chat.qwenlm.ai/&#34;&gt;chat.qwenlm.ai&lt;/a&gt; consolidates all of Qwen&amp;rsquo;s models in one ChatGPT-like interface.&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    <item>
      <title>Clone any voice with a 15-second sample</title>
      <link>https://www.s-anand.net/blog/clone-any-voice-with-a-15-second-sample/</link>
      <pubDate>Thu, 24 Oct 2024 01:36:21 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/clone-any-voice-with-a-15-second-sample/</guid>
      <description>&lt;p&gt;&lt;img alt=&#34;Clone any voice with a 15-second sample&#34; loading=&#34;lazy&#34; src=&#34;https://www.s-anand.net/blog/assets/calvin-voice-cloning.webp&#34;&gt;&lt;/p&gt;
&lt;p&gt;It&#39;s surprisingly easy to clone a voice using &lt;a href=&#34;https://github.com/SWivid/F5-TTS&#34;&gt;F5-TTS&lt;/a&gt;: &#34;A Fairytaler that Fakes Fluent and Faithful Speech with Flow Matching&#34;.&lt;/p&gt;
&lt;p&gt;Here&#39;s a clip of me, saying:&lt;/p&gt;
&lt;blockquote class=&#34;wp-block-quote&#34;&gt;
&lt;p&gt;I think Taylor Swift is the best singer. I&#39;ve attended every one of her concerts and in fact, I&#39;ve even proposed to her once. Don&#39;t tell anyone.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;(Which is ironic since I didn&#39;t know who she was until this year and I still haven&#39;t seen or heard her.)&lt;/p&gt;
&lt;figure class=&#34;wp-block-audio&#34;&gt;&lt;audio controls=&#34;&#34; src=&#34;https://www.s-anand.net/blog/assets/anand-proposes-to-taylor-swift.opus&#34;&gt;&lt;/audio&gt;&lt;/figure&gt;
&lt;p&gt;You&#39;ll notice that my voice is a bit monotic. That&#39;s because I trained it on a segment of my talk that&#39;s monotonic.&lt;/p&gt;
&lt;figure class=&#34;wp-block-audio&#34;&gt;&lt;audio controls=&#34;&#34; src=&#34;https://www.s-anand.net/blog/assets/anand.opus&#34;&gt;&lt;/audio&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&#34;https://colab.research.google.com/drive/1YEMIdby-Nr--ox2-Wl5Racb5f0ncpqRu?usp=sharing&#34;&gt;&lt;strong&gt;Here&#39;s the code&lt;/strong&gt;&lt;/a&gt;. You can run this on Google Colab for free.&lt;/p&gt;
&lt;p&gt;A few things to keep in mind when preparing the audio.&lt;/p&gt;
&lt;ol class=&#34;wp-block-list&#34;&gt;
&lt;li&gt;Keep the input to just under 15 seconds. That&#39;s the optimal length&lt;/li&gt;
&lt;li&gt;For expressive output, use an input with a broad range of voice emotions&lt;/li&gt;
&lt;li&gt;When using unusual words (e.g. LLM), including the word in your sample helps&lt;/li&gt;
&lt;li&gt;Transcribe &lt;code&gt;input.txt&lt;/code&gt; &lt;em&gt;manually&lt;/em&gt; to get it right, though &lt;a href=&#34;https://huggingface.co/openai/whisper-large-v3&#34;&gt;Whisper&lt;/a&gt; is fine to clone in bulk. (But then, who are you and &lt;em&gt;what&lt;/em&gt; are you doing?)&lt;/li&gt;
&lt;li&gt;Sometimes, each chunk of audio generated has a second of audio from the original interspersed. I don&#39;t know why. Maybe a second of silence at the end helps&lt;/li&gt;
&lt;li&gt;Keep punctuation simple in the generated text. For example, avoid hyphens like &#34;This is obvious - don&#39;t try it.&#34; Use &#34;This is obvious, don&#39;t try it.&#34; instead.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This has a number of uses I can think of (er... ChatGPT can think of), but the ones I find most interesting are:&lt;/p&gt;
&lt;ol class=&#34;wp-block-list&#34;&gt;
&lt;li&gt;&lt;strong&gt;Author-narrated audio books&lt;/strong&gt;. I&#39;m sure this is coming soon, if it&#39;s not already there.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Personalized IVR&lt;/strong&gt;. Why should &lt;em&gt;my&lt;/em&gt; IVR speak in some &lt;em&gt;other&lt;/em&gt; robot&#39;s voice? Let&#39;s use mine. (This has some prank potential.)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Annotated presentations&lt;/strong&gt;. I&#39;m too lazy to speak. Typing is easier. This lets me create, for example, slide decks with my voice, but with &lt;em&gt;editing made super-easy&lt;/em&gt;. I just change the text and the audio changes.&lt;/li&gt;
&lt;/ol&gt;
</description>
    </item>
    <item>
      <title>Things I Learned - 13 Oct 2024</title>
      <link>https://www.s-anand.net/blog/things-i-learned-13-oct-2024/</link>
      <pubDate>Sun, 13 Oct 2024 00:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/things-i-learned-13-oct-2024/</guid>
      <description>&lt;p&gt;This week, I learned:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://duckdb.org/docs/sql/functions/overview.html#function-chaining-via-the-dot-operator&#34;&gt;DuckDB supports function chaining&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://duckdb.org/docs/sql/statements/create_macro.html&#34;&gt;DuckDB lets you create functions = macros&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://htmlforpeople.com/&#34;&gt;HTML for People&lt;/a&gt; is a nice introduction to HTML.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.flightradar24.com/&#34;&gt;FlightRadar24&lt;/a&gt; lets you watch airplanes live.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://sq.io/&#34;&gt;sq&lt;/a&gt; is like &lt;code&gt;jq&lt;/code&gt; but for SQL.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://deno.com/&#34;&gt;Deno 2&lt;/a&gt; is fully backward compatible with Node! &lt;a href=&#34;https://deno.com/blog/v2.0&#34;&gt;via&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;O1 is good at solving problems where the solution is easy to verify and generating options helps get closer to the solution&lt;/li&gt;
&lt;li&gt;Reverb ASR does diarration as well as transcription. It seems the state of art right now.&lt;/li&gt;
&lt;li&gt;Gemini Flash and Gemini Flash 8b can be fine-tuned at zero cost. Inference is at the same price! &lt;a href=&#34;https://ai.google.dev/pricing&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Flux 1.1 Pro is released. I tried my Calvin &amp;amp; Hobbes test on it. Not great. ImageGen3 is better, ChatGPT is the best. &lt;a href=&#34;https://www.s-anand.net/blog/image-generation-gets-better-at-comics/&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Revisiting text to speech models. Nothing much has changed since July 2024.
&lt;ul&gt;
&lt;li&gt;OpenAI TTS: $15/1M chars &lt;a href=&#34;https://openai.com/api/pricing/&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Deepgram Aura: $15/1M chars &lt;a href=&#34;https://deepgram.com/pricing&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Azure AI Speech: $15/1M chars &lt;a href=&#34;https://azure.microsoft.com/en-us/pricing/details/cognitive-services/speech-services/&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Google TTS Neural2: $16/1M chars &lt;a href=&#34;https://cloud.google.com/text-to-speech/pricing?hl=en&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;AWS Polly Neural TTS: $16/1M chars &lt;a href=&#34;https://aws.amazon.com/polly/pricing/&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Cartesia Pro: $50/1M chars &lt;a href=&#34;https://www.cartesia.ai/pricing&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Elevenlabs Scale: $300/1M chars &lt;a href=&#34;https://elevenlabs.io/pricing&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;GitHub co-pilot workspaces let you code using your mobile with AI and deploy it at one shot&lt;/li&gt;
&lt;li&gt;If you need an Ubuntu Docker container with Python, install it via uv rather than compiling from source. &lt;a href=&#34;https://mkennedy.codes/posts/python-docker-images-using-uv-s-new-python-features/&#34;&gt;via&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.visioncortex.org/vtracer/&#34;&gt;VTracer&lt;/a&gt; is an open source library (and tool) to convert raster images to SVGs. &lt;a href=&#34;https://simonwillison.net/2024/Oct/7/vtracer/&#34;&gt;via&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;If you want to create a &lt;code&gt;console.llm()&lt;/code&gt; function, a browser extension is the best way, because some pages have Content-Security-Policy that block eval, form submission, fetch from other domains, and script execution.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.pypi.org/trusted-publishers/adding-a-publisher/&#34;&gt;PyPi lets you publish from GitHub Actions&lt;/a&gt; without a token. Also from Gitlab.com CI/CD and Google Cloud.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/ActiveState&#34;&gt;ActiveState&lt;/a&gt; which made ActivePython, ActivePerl, etc. made these products paid for commercial use around 2013 after a series of acquisitions.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://marimo.app/&#34;&gt;Marimo&lt;/a&gt; supports:
&lt;ul&gt;
&lt;li&gt;Publishing any notebook to static.marimo.app as a static app&lt;/li&gt;
&lt;li&gt;Creating a SINGLE link that embeds the ENTIRE notebook in the URL!&lt;/li&gt;
&lt;li&gt;Runnable via &lt;code&gt;uvx marimo edit&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://youtu.be/eaAonE58sLU&#34;&gt;Parables on the Power of Planning in AI&lt;/a&gt;: Giving models about 30 seconds of thinking time consistently improves results - as much as increasing parameter size by a factor of 1,000 to 100,000!
&lt;ul&gt;
&lt;li&gt;This works particularly well for verifiable results (code, math, etc.)&lt;/li&gt;
&lt;li&gt;Technique: Ask an LLM hundreds of times at low temperature and pick the most common one. (Google&amp;rsquo;s Minerva used this on the MATH dataset.)&lt;/li&gt;
&lt;li&gt;Better Technique: Ask an LLM hundreds of times. Pick the best solution based on an evaluation metric (reward model)&lt;/li&gt;
&lt;li&gt;Better Technique: Apply a reward model at EACH step of the process. OpenAI&amp;rsquo;s &amp;ldquo;Let&amp;rsquo;s Verify Step by Step&amp;rdquo;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://jina.ai/news/late-chunking-in-long-context-embedding-models/&#34;&gt;Late chunking&lt;/a&gt; is an interesting approach to adding context to embeddings. (I don&amp;rsquo;t understand it, but it&amp;rsquo;s cheap and effective.)&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://deepinfra.com/models/embeddings&#34;&gt;DeepInfra offers embedding models as APIs&lt;/a&gt; at about 0.5 to 1 cent per MTok in an OpenAI compatible API.
It also supports &lt;a href=&#34;https://deepinfra.com/models/text-to-image&#34;&gt;text-to-image models&lt;/a&gt; like flux.dev and
&lt;a href=&#34;https://deepinfra.com/models/automatic-speech-recognition&#34;&gt;speech recognition models&lt;/a&gt; like Whisper.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.youtube.com/watch?v=eBVi_sLaYsc&#34;&gt;Jake Heller&lt;/a&gt;:
&lt;ul&gt;
&lt;li&gt;&amp;ldquo;One of the things we learned is (an LLM app) after it passes passes frankly even 100 tests, the odds that it will do, on any random distribution of user inputs, the next 100,000 100% accurately is very high.&amp;rdquo;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;OpenAI&amp;rsquo;s O1 is like Daniel Kahneman&amp;rsquo;s System 2 thinking - as against other LLMs&amp;rsquo; System 1 thinking.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.continue.dev/&#34;&gt;Continue.dev&lt;/a&gt; is another AI coding editor. It supports OpenRouter. So now I have heard good things about:
&lt;ul&gt;
&lt;li&gt;Github Copilot&lt;/li&gt;
&lt;li&gt;Cursor&lt;/li&gt;
&lt;li&gt;Cody&lt;/li&gt;
&lt;li&gt;Continue.dev (supports OpenRouter)&lt;/li&gt;
&lt;li&gt;Aider (supports OpenRouter)&lt;/li&gt;
&lt;li&gt;Maybe:
&lt;ul&gt;
&lt;li&gt;Codeium&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Not:
&lt;ul&gt;
&lt;li&gt;Amazon Q Developer&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    <item>
      <title>Things I Learned - 14 Jul 2024</title>
      <link>https://www.s-anand.net/blog/things-i-learned-14-jul-2024/</link>
      <pubDate>Sun, 14 Jul 2024 00:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/things-i-learned-14-jul-2024/</guid>
      <description>&lt;p&gt;This week, I learned:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Carlton&amp;rsquo;s TDS session
&lt;ul&gt;
&lt;li&gt;Always create a new venv via VS Code when starting a training session. Helps reproduce issues (though I could use Colab instead)&lt;/li&gt;
&lt;li&gt;Create an empty .ipynb notebook and double-click it. That&amp;rsquo;s another way (though slower) to open a Jupyter notebook&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Share Parrish Knowledge Project podcast. Three generations of wealth
&lt;ul&gt;
&lt;li&gt;There is a big difference between liking animals and being a vet. Between liking education and being a teacher.&lt;/li&gt;
&lt;li&gt;Even if no one reads your writing, you benefit from the writing.&lt;/li&gt;
&lt;li&gt;Emotional.crises like 9/11 or Covid are far easier for markets to recover from&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Hidden brain podcast. White trying to hard can back fire on you
&lt;ul&gt;
&lt;li&gt;Sometimes conscious thinking makes our automated responses of sports music, dance are great examples&lt;/li&gt;
&lt;li&gt;Instead, SURRENDER to something outside of you. Like playing with kids. Exercise also sends blood away from brain. Drugs. ChatGPT.&lt;/li&gt;
&lt;li&gt;It&amp;rsquo;s called Ue in Chinese philosophy&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;A quick check on the pricing of text to speech models
&lt;ul&gt;
&lt;li&gt;OpenAI TTS: $15/1M chars &lt;a href=&#34;https://openai.com/api/pricing/&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Deepgram Aura: $15/1M chars &lt;a href=&#34;https://deepgram.com/pricing&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Elevenlabs Scale: $165/1M chars &lt;a href=&#34;https://elevenlabs.io/pricing&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Google TTS Neural2: $16/1M chars &lt;a href=&#34;https://cloud.google.com/text-to-speech/pricing?hl=en&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Azure AI Speech: $15/1M chars &lt;a href=&#34;https://azure.microsoft.com/en-us/pricing/details/cognitive-services/speech-services/&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;AWS Polly Neural TTS: $16/1M chars &lt;a href=&#34;https://aws.amazon.com/polly/pricing/&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    <item>
      <title>Text to speech on your website</title>
      <link>https://www.s-anand.net/blog/text-to-speech-on-your-website/</link>
      <pubDate>Thu, 17 Apr 2003 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/text-to-speech-on-your-website/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://vhost.oddcast.com/&#34;&gt;[V]Host&lt;/a&gt; &amp;ndash; interesting text-to-speech web application. You can put Flash characters on your site that&amp;rsquo;ll read out anything.&lt;/p&gt;
</description>
    </item>
  </channel>
</rss>
