AndreasMarcec / gpt_summary

Command-line tool for downloading videos and summarize their content to text or speech.
Other
6 stars 0 forks source link

Feature Request: Cost Estimation #1

Open ka1h opened 3 weeks ago

ka1h commented 3 weeks ago

Hi Andreas,

thanks for the great project! 🚀

Description

I would like to request a new feature: an integrated cost estimation feature. This feature would provide users with an estimated cost of processing a given YouTube video before they proceed with the summarization. This estimation should take into account the costs associated with the Whisper API and GPT-4 usage, referencing the pricing details available at OpenAI API Pricing.

Feature Details

A rough proposal of the feature breakdown would be:

  1. Download YouTube Videos:
    • Extract the total duration of the YouTube video to estimate the data size and associated costs for downloading.
  2. Split Audio:
    • Determine the number of chunks required based on the video duration to comply with OpenAI's API size limitations.
  3. Transcribe Audio:
    • Estimate the cost for transcribing the audio chunks using the Whisper API, considering the duration and number of chunks.
  4. Summarize Transcriptions:
    • Calculate the cost for summarizing the transcriptions using GPT-4, based on the length and complexity of the text.
  5. Text-to-Speech:
    • Estimate the cost for converting the final summary back to speech using OpenAI's text-to-speech API.
  6. Total Cost Estimation:
    • Aggregate the costs from downloading, splitting, transcribing, summarizing, and text-to-speech conversion to provide a total estimated cost.
  7. User Interface:
    • Display the estimated cost prominently to the user before they confirm the summarization request.
    • Optionally, provide a breakdown of costs for better transparency.
  8. Logging:
    • Implement comprehensive logging for the cost estimation feature to help with debugging and monitoring the process.

Benefits

Additional Notes

Thank you for considering this feature request!

References

Cheers, Kai

AndreasMarcec commented 3 weeks ago

Thanks for the request. I'm working on it. Though the estimation will probably be pretty rough.