# Embedding

    class Embedding: NSObject

Represents the embedding for a given embedder head. Typically used in embedding tasks.

One and only one of the two 'floatEmbedding' and 'quantizedEmbedding' will contain data, based on whether or not the embedder was configured to perform scala quantization.
- `
  ### [init(floatEmbedding:quantizedEmbedding:head:headName:)](https://developers.google.com/edge/api/mediapipe/swift/audio/Classes/Embedding.md.txt#/c:objc(cs)MPPEmbedding(im)initWithFloatEmbedding:quantizedEmbedding:headIndex:headName:)

  ` Initializes a new `MPPEmbedding` with the given float embedding, quantized embedding, head index and head name.

  #### Declaration

  Swift

      init(floatEmbedding: [NSNumber]?, quantizedEmbedding: [NSNumber]?, head headIndex: Int, headName: String?)

  #### Parameters

  |---|---|
  | `floatEmbedding` | The optional Floating-point embedding. |
  | `quantizedEmbedding` | The optional Quantized embedding. |
  | `headIndex` | The index of the embedder head. |
  | `headName` | The optional name of the embedder head. |

  #### Return Value

  An instance of `MPPEmbedding` initialized with the given float embedding, quantized embedding, head index and head name.
- `
  ### [floatEmbedding](https://developers.google.com/edge/api/mediapipe/swift/audio/Classes/Embedding.md.txt#/c:objc(cs)MPPEmbedding(py)floatEmbedding)

  ` The embedding represented as an `NSArray` of `Float` values. Empty if the embedder was configured to perform scalar quantization.

  #### Declaration

  Swift

      var floatEmbedding: [NSNumber]? { get }

- `
  ### [headIndex](https://developers.google.com/edge/api/mediapipe/swift/audio/Classes/Embedding.md.txt#/c:objc(cs)MPPEmbedding(py)headIndex)

  ` The index of the embedder head these entries refer to. This is useful for multi-head models.

  #### Declaration

  Swift

      var headIndex: Int { get }

- `
  ### [headName](https://developers.google.com/edge/api/mediapipe/swift/audio/Classes/Embedding.md.txt#/c:objc(cs)MPPEmbedding(py)headName)

  ` The optional name of the embedder head, which is the corresponding tensor metadata name.

  #### Declaration

  Swift

      var headName: String? { get }

- `
  ### [quantizedEmbedding](https://developers.google.com/edge/api/mediapipe/swift/audio/Classes/Embedding.md.txt#/c:objc(cs)MPPEmbedding(py)quantizedEmbedding)

  ` The embedding represented as an `NSArray` of `UInt8` values. Empty if the embedder was not configured to perform scalar quantization.

  #### Declaration

  Swift

      var quantizedEmbedding: [NSNumber]? { get }