class_docstr: Base `ID` Manager class. Every new `ID` manager must inherit this.
  It defines common `ID` manager specific functions.
class_docstr_tok: ["Base","`","ID","`","Manager","class",".","Every","new","`","ID","`","manager","must","inherit","this",".","It","defines","common","`","ID","`","manager","specific","functions","."]
docstr: Parse IDs from data samples retured by `load_tts_samples()`.
  
  Args:
      items (list): Data sampled returned by `load_tts_samples()`.
      parse_key (str): The key to being used to parse the data.
  Returns:
      Tuple[Dict]: speaker IDs.
docstr_tok: ["Parse","IDs","from","data","samples","retured","by","`","load_tts_samples","(",")","`",".","Args",":","items","(","list",")",":","Data","sampled","returned","by","`","load_tts_samples","(",")","`",".","parse_key","(","str",")",":","The","key","to","being","used","to","parse","the","data",".","Returns",":","Tuple","[","Dict","]",":","speaker","IDs","."]
code: def parse_ids_from_data(items: List, parse_key: str) -> Tuple[Dict]:
      """Parse IDs from data samples retured by `load_tts_samples()`.
  
      Args:
          items (list): Data sampled returned by `load_tts_samples()`.
          parse_key (str): The key to being used to parse the data.
      Returns:
          Tuple[Dict]: speaker IDs.
      """
      classes = sorted({item[parse_key] for item in items})
      ids = {name: i for i, name in enumerate(classes)}
      return ids
  
imports: import json
  import random
  from typing import Any, Dict, List, Tuple, Union
  import fsspec
  import numpy
  import torch
  from TTS.config import load_config
  from TTS.encoder.utils.generic_utils import setup_encoder_model
  from TTS.utils.audio import AudioProcessor
label_desc: Use image node_id 8 for calling the BaseIDManager obj's underlying member method code with example usage: obj.parse_ids_from_data(items, parse_key) and returns: ids