openai / openai-realtime-console

React app for inspecting, building and debugging with the Realtime API
MIT License
2.06k stars 748 forks source link

Consider publishing wavtools as a standalone library #466

Closed arnaudbreton closed 2 days ago

arnaudbreton commented 2 weeks ago

Hi,

First of all, I want to thank you for developing the wavtools. I've struggled many hours to make something work with React Native + Expo and outdated libraries and your library just worked OOTB!

I was wondering if you could considering publishing it on its one? Currently I'm using it in a side project of mine, and I had to copy the code into it, which I think isn't a good approach. Or maybe I missed another nice way to do so?

Thanks

davekiss commented 4 days ago

Agree, feels like a great standalone library. Until then, you can add the GitHub repo as a dependency to your project within package.json and import it from there:

"dependencies": {
  "@openai/realtime-api-beta": "github:openai/openai-realtime-api-beta"
}

Then, in your component:

import { WavRecorder, WavStreamPlayer } from "@openai/realtime-console/src/lib/wavtools/index.js";
keithwhor commented 3 days ago

Hey folks -- I'm no longer at OpenAI, so I went ahead and published this as a standalone library:

https://github.com/keithwhor/wavtools https://www.npmjs.com/package/wavtools

You can now use npm i wavtools --save -- feel free to contribute, and I'll do my best to keep it up to date. I'm using it, too!

arnaudbreton commented 2 days ago

Great stuff, thanks @keithwhor !

Thanks for the tip @davekiss