Title: Page 22 – Alex Kirk

---

 * 
   ## 󠀁[OpenAI Text-to-Speech](https://alex.kirk.at/2023/11/07/openai-text-to-speech/)󠁿
   
 * November 7, 2023
 * It has been a somewhat interesting coincidence that I am currently without voice
   because of a cold, and [OpenAI has just released](https://openai.com/blog/new-models-and-developer-products-announced-at-devday)
   some really good Text-to-Speech voices with their [Create speech API](https://platform.openai.com/docs/api-reference/audio/createSpeech).
   So in preparation for a meeting today, [I created a little script](https://github.com/akirk/chat-cli/blob/main/talk.php)
   that will output the spoke audio what I typed.
 * Since the voice will read exactly what’s there, I added a spell fixer that will(
   through ChatGPT) automatically fix typos before it’s sent to the audio API.
 *     ```wp-block-code
       $ php talk.php
       Voice: echo
       Fix spelling: off
       Speed: 1.0
       > hi everyone and welcoem to tis meetin
       > sc
       Fix spelling: on
       > hi everyone and welcoem to tis meetin
       Hi everyone and welcome to this meeting.
       > s2
       Speed: 2
       > my voice is gone because of a pretty string cold that iv pickd up
       My voice is gone because of a pretty strong cold that I've picked up.
       > s1.1
       Speed: 1.1
       > my voice is gone because of a pretty string cold that iv pickd up
       My voice is gone because of a pretty strong cold that I've picked up.
       > turns out, even suing the streaming audio aip, typing and then waiting for the srsult is too lsow for a conversation. but it's been interesting
       Turns out, even using the streaming audio API, typing and then waiting for the result is too slow for a conversation. But it's been interesting.
       > sc
       Fix spelling: off
       > without spell fixer it's faster but for good intonation it only makes sense to send full sentences, not single words as soon as they have been typed. maybe that can also be solved, but that's for the next experiment
       ```
   
 * In any case, it’s been fun. Thanks [Simon for highlighting the API](https://simonwillison.net/2023/Nov/7/ospeak/).
 * [Web](https://alex.kirk.at/category/web/)
 * November 7, 2023
 * [@rasos](https://fairmove.net/@rasos) Well, reblog will prepend post it as a 
   post with a “Reblog from” and an attribution link. You could then edit that post.
   But be careful about the attribution, please don’t just post someone else’s post
   under your own name.
 * [Web](https://alex.kirk.at/category/web/)

 [Previous Page](https://alex.kirk.at/page/21/?output_format=md&term_id=44048) [Next Page](https://alex.kirk.at/page/23/?output_format=md&term_id=44048)