VoiceTemplateFactory
IntroductionClass for creating and merging voice templates. Methods
createVoiceTemplate:channelType:error:Creates template with contents of the given WAV file. - (VoiceTemplate* _Nullable)createVoiceTemplate:(NSString* _Nonnull)wavPath channelType:(ChannelType)channelType error:(NSError* _Nullable* _Nullable)error; Parameters
Return ValueCreated voice template. createVoiceTemplate:error:Creates template with contents of the given WAV file. - (VoiceTemplate* _Nullable)createVoiceTemplate:(NSString* _Nonnull)wavPath error:(NSError* _Nullable* _Nullable)error; Parameters
Return ValueCreated voice template. createVoiceTemplate:sampleRate:channelType:error:Creates template from the given PCM16 audio samples. - (VoiceTemplate* _Nullable)createVoiceTemplate:(NSData* _Nonnull)PCM16Samples sampleRate:(size_t)sampleRate channelType:(ChannelType)channelType error:(NSError* _Nullable* _Nullable)error; Parameters
Return ValueCreated voice template. createVoiceTemplate:sampleRate:error:Creates template from the given PCM16 audio samples. - (VoiceTemplate* _Nullable)createVoiceTemplate:(NSData* _Nonnull)PCM16Samples sampleRate:(size_t)sampleRate error:(NSError* _Nullable* _Nullable)error; Parameters
Return ValueCreated voice template. getInitDataId:Returns ID of the init data, which was used to create the factory. - (NSString* _Nullable)getInitDataId:(NSError* _Nullable* _Nullable)error; ParametersReturn ValueA string containing init data ID. getMinimumAudioSampleRate:Returns minimum supported input audio sampling frequency in Hz. - (NSNumber* _Nullable)getMinimumAudioSampleRate:(NSError* _Nullable* _Nullable)error; ParametersReturn ValueA minimum sampling rate in Hz. initWithPath:error:Creates VoiceTemplateFactory instance. - (instancetype _Nullable)initWithPath:(NSString* _Nonnull)path error:(NSError* _Nullable* _Nullable)error; ParametersmergeVoiceTemplates:error:Merges multiple voice templates of a single speaker to a union voice template. - (VoiceTemplate* _Nullable)mergeVoiceTemplates:(NSArray* _Nonnull)templates error:(NSError* _Nullable* _Nullable)error; ParametersReturn ValueA union voice template. All the templates should have the same init data ID as the factory instance.: |