VoiceSDK  5.0.2
voice_template.h
Go to the documentation of this file.
1 /* Copyright 2020 ID R&D Inc. All Rights Reserved. */
2 
3 #pragma once
4 
5 #include <memory>
6 #include <string>
7 
8 #include <voicesdk/core/config.h>
9 
10 namespace voicesdk {
11 
15  enum class ChannelType {
16  MIC = 1,
17  TEL = 2,
18  MIXED = 3
19  };
20 
25  public:
26 
27  using Ptr = std::shared_ptr<VoiceTemplate>;
28 
34  virtual void serialize(std::ostream &stream) const = 0;
35 
42  static Ptr deserialize(std::istream &stream);
43 
49  virtual void saveToFile(const std::string& filepath) const = 0;
50 
57  static Ptr loadFromFile(const std::string& filepath);
58 
63  virtual const ChannelType& getChannelType() const = 0;
64 
69  virtual const std::string& getInitDataId() const = 0;
70 
76  virtual bool isValid() const = 0;
77 
78  virtual ~VoiceTemplate() = default;
79  };
80 }
Definition: intervals.h:8
Class representing a voice template (voice profile)
Definition: voice_template.h:24
#define VOICE_SDK_API
Definition: config.h:21
ChannelType
An enumeration for audio source labeling during voice template creation.
Definition: voice_template.h:15
std::shared_ptr< VoiceTemplate > Ptr
Definition: voice_template.h:27