5 #include <voicesdk/core/config.h>
22 enum class Gender : uint8_t { MALE = 0, FEMALE = 1 };
37 Attributes(
const float& gender_score_,
const Gender& gender_,
const size_t& age_,
44 bool operator==(
const Attributes& other)
const {
48 friend std::ostream& operator<<(std::ostream& os,
const Attributes& obj) {
50 <<
"genderScore: " << obj.gender_score <<
", "
51 <<
"gender: " << (obj.gender == Gender::MALE ?
"MALE" :
"FEMALE") <<
", "
52 <<
"age: " << obj.age <<
", "
53 <<
"phoneCallParticipant: "
92 using Ptr = std::shared_ptr<AttributesEstimator>;
101 static AttributesEstimator::Ptr
Create(
const std::string& init_path);
123 virtual Attributes Estimate(
const int16_t* pcm16_samples,
size_t samples_num,
size_t sample_rate) = 0;
Class for estimating person attributes by their voice (age and gender)
Definition: attributes.h:90
static AttributesEstimator::Ptr Create(const std::string &init_path)
Creates AttributesEstimator instance.
virtual Attributes Estimate(const int16_t *pcm16_samples, size_t samples_num, size_t sample_rate)=0
virtual Attributes Estimate(const std::string &audio_file)=0
virtual Attributes Estimate(const float *float_samples, size_t samples_num, size_t sample_rate)=0
virtual Attributes Estimate(const uint8_t *bytes, size_t bytes_num, size_t sample_rate)=0
Structure representing estimated person attributes.
Definition: attributes.h:17
const size_t age
Estimated age in years.
Definition: attributes.h:78
const Gender gender
Estimated gender.
Definition: attributes.h:73
const PhoneCallParticipant phone_call_participant
Estimated phone call participant class. Makes sense only for single speaker phone call recordings.
Definition: attributes.h:84
PhoneCallParticipant
Enumeration representing phone call participant class.
Definition: attributes.h:28
Gender
Enumeration representing human gender.
Definition: attributes.h:22
const float gender_score
Raw gender score (the bigger score corresponding to male and the smaller score corresponding to femal...
Definition: attributes.h:68