DocWire SDK
DocWire SDK: Award-winning modern data processing in C++20. SourceForge Community Choice & Microsoft support. AI-driven processing. Supports nearly 100 data formats, including email boxes and OCR. Boost efficiency in text extraction, web data extraction, data mining, document analysis. Offline processing possible for security and confidentiality
text_to_speech.h
1 /*********************************************************************************************************************************************/
2 /* DocWire SDK: Award-winning modern data processing in C++20. SourceForge Community Choice & Microsoft support. AI-driven processing. */
3 /* Supports nearly 100 data formats, including email boxes and OCR. Boost efficiency in text extraction, web data extraction, data mining, */
4 /* document analysis. Offline processing possible for security and confidentiality */
5 /* */
6 /* Copyright (c) SILVERCODERS Ltd, http://silvercoders.com */
7 /* Project homepage: https://github.com/docwire/docwire */
8 /* */
9 /* SPDX-License-Identifier: GPL-2.0-only OR LicenseRef-DocWire-Commercial */
10 /*********************************************************************************************************************************************/
11 
12 #ifndef DOCWIRE_OPENAI_TEXT_TO_SPEECH_H
13 #define DOCWIRE_OPENAI_TEXT_TO_SPEECH_H
14 
15 #include "chain_element.h"
16 #include "openai_export.h"
17 #include "message.h"
18 #include <string>
19 
20 namespace docwire
21 {
22 namespace openai
23 {
24 
25 class DOCWIRE_OPENAI_EXPORT TextToSpeech : public ChainElement, public with_pimpl<TextToSpeech>
26 {
27 public:
28  enum class Model
29  {
30  gpt_4o_mini_tts, tts_1, tts_1_hd
31  };
32 
33  enum class Voice
34  {
35  alloy, echo, fable, onyx, nova, shimmer
36  };
37 
38  TextToSpeech(const std::string& api_key, Model model = Model::gpt_4o_mini_tts, Voice voice = Voice::alloy);
39 
46  continuation operator()(message_ptr msg, const message_callbacks& emit_message) override;
47 
48  bool is_leaf() const override
49  {
50  return false;
51  }
52 
53 private:
55 };
56 
57 } // namespace openai
58 } // namespace docwire
59 
60 #endif //DOCWIRE_OPENAI_TEXT_TO_SPEECH_H
continuation operator()(message_ptr msg, const message_callbacks &emit_message) override
Executes transform operation for given node data.
bool is_leaf() const override
Check if ChainElement is a leaf (last element which doesn't produce any messages)....
The main namespace for the DocWire SDK.
Definition: ai_elements.h:19