pyampact.alignment.get_ons_offs
- pyampact.alignment.get_ons_offs(onsoffs)[source]
Extract onset and offset times from a 3*N alignment matrix generated by AMPACT’s HMM-based alignment algorithm.
- Parameters:
onsoffs (ndarray) – A 3*N alignment matrix where: - The first row contains N states. - The second row contains the corresponding ending times for each state. - The third row contains the state indices.
- Returns:
res – A dictionary containing: - ‘ons’: List of onset times. - ‘offs’: List of offset times.
- Return type:
dict