AudioEmbedder
class AudioEmbedder : NSObjectPerforms audio embedding extraction on audio clips or continuous audio streams.
-
Creates an
AudioEmbedderfrom a local model file path.Declaration
Swift
convenience init(modelPath: String) throws -
Creates an
AudioEmbedderfrom the givenAudioEmbedderOptions.Declaration
Swift
init(options: AudioEmbedderOptions) throws -
Extracts audio embeddings from the provided audio clip.
Declaration
Swift
func embed(audioClip: AudioData) throws -> AudioEmbedderResult -
Sends an audio block in a continuous stream for asynchronous embedding extraction.
Declaration
Swift
func embedAsync(audioBlock: AudioData, timestampInMilliseconds: Int) throws -
Computes cosine similarity between two
Embeddingobjects.Declaration
Swift
class func cosineSimilarity(embedding1: Embedding, embedding2: Embedding) throws -> NSNumber -
Closes and cleans up the MediaPipe audio embedder.
Declaration
Swift
func close() throws