in any format (Office, PDF, mail, etc) in two steps: summarize using GPT model and convert the summary to speech using text to speech model. Result is saved to mp3 file#include "docwire.h"
#include <fstream>
int main(int argc, char* argv[])
{
using namespace docwire
try
{
std::filesystem::path("1.doc") | content_type::detector{} | office_formats_parser{} | PlainTextExporter() | openai::Summarize(std::getenv("OPENAI_API_KEY")) | openai::TextToSpeech(std::getenv("OPENAI_API_KEY")) | std::ofstream("summary.mp3")
}
catch (const std::exception& e)
{
std::cerr << errors::diagnostic_message(e) << std::endl
return 1
}
return 0
}
浙公网安备 33010602011771号