For AudioPlayer.tsx:
Refactor: Improved AudioPlayer with dynamic filename and simplified download.
Added an optional filename prop to allow custom download filenames (used for timestamped names).
Reused the blobUrl for both audio playback and download, eliminating redundant code.
Corrected the useEffect cleanup to only revoke the necessary URL.

For PodcastGenerator.tsx:
Feat: Integrated denoising, MP3/WAV downloads, and controlled blog upload.
Combined original and suggested edits for a complete podcast generation component.
Added wavBlob and mp3Blob states for WAV and MP3 download functionality.
Implemented download links for both WAV and MP3 formats, using timestamped filenames.
Integrated optional denoising using the audio-denoiser library (requires denoiseAudioBuffer implementation in utils.ts).
Added an uploadToBlog checkbox to explicitly control blog uploads, enhancing user privacy and control. Upload only happens if isBlogMode, the checkbox is checked, a token is provided, and a blog URL is entered.
Improved error handling during the upload process.
Cleaned up state management for a more consistent UI.

Untested by me - as I don't have local react server.

The conversion to mp3 freeze up the browser for some seconds so I don't want to do it implicitly. I'll add a dedicated component to control the mp3 conversion.

Btw, if you can't test it, it's better to open a discussion. The diff code is very hard for me to follow.

ngxson changed pull request status to closed

I added a button to convert to mp3

The isBlogMode is internally used by me so I don't want to expose it to the outside world, there is too much work to do to make it usable.

Just to note really quick i'm writing something that I don't know how to implement - but will try to make reason
the thing which I think will be great will be prompts.ts to use more than one prompt to send to the AI - i've prepared 3, but am testing the outputs and how to make them better
so if this is added in the ScriptMaker.tsx will have to be added option to pick from this dropdown and use the one - and from there instead of just Podcast the AI will be able to make comprehensive storytelling - anything in fact :)

Sign up or log in to comment