annotations.Activity package¶
Submodules¶
annotations.Activity.activity module¶
- filename
sppas.src.annotations.Activity.activity.py
- author
Brigitte Bigi
- contact
- summary
Activity automatic detection.
- class annotations.Activity.activity.Activity[source]¶
Bases:
object
Create an activity tier from time-aligned tokens.
- append_activity(token, activity)[source]¶
Append a new activity.
- Parameters
token – (str) The token of the tier TokensAlign
activity – (str) Name of the activity
- get_tier(tokens_tier, tmin, tmax)[source]¶
Create and return the activity tier.
- Parameters
tokens_tier – (sppasTier) a tier with time-aligned tokens
- Returns
sppasTier
- set_activities(activities={'#': 'silence', '*': 'noise', '+': 'pause', '@': 'laugh', 'dummy': 'dummy', 'laugh': 'laugh', 'noise': 'noise', 'sil': 'silence', 'sp': 'pause'})[source]¶
Fix the dictionary of possible non-speech activities.
- Parameters
activities – (dict) A dictionary of activities.
The key is the token; the value is the name of the activity.
annotations.Activity.sppasactivity module¶
- filename
sppas.src.annotations.Activity.sppasactivity.py
- author
Brigitte Bigi
- contact
- summary
SPPAS integration of Activity automatic annotation
- class annotations.Activity.sppasactivity.sppasActivity(log=None)[source]¶
Bases:
annotations.baseannot.sppasBaseAnnotation
SPPAS integration of the Activity generation.
- __init__(log=None)[source]¶
Create a new sppasActivity instance.
- Parameters
log – (sppasLog) Human-readable logs.
- convert(tier, tmin, tmax)[source]¶
Create an Activity and ActivityDuration tier.
- Parameters
tier – (sppasTier)
tmin – (sppasPoint)
tmax – (sppasPoint)
- Returns
(sppasTier, sppasTier)
- fix_options(options)[source]¶
Fix all options.
Available options are:
duration
- Parameters
options – (sppasOption)
- get_inputs(input_files)[source]¶
Return the the tier with aligned tokens.
- Parameters
input_files – (list)
- Raise
NoTierInputError
- Returns
(sppasTier)
Module contents¶
- filename
sppas.src.annotations.activity.__init__.py
- author
Brigitte Bigi
- contact
- summary
Activity automatic annotations of SPPAS.
An activity is defined by a type of audio production. Activities can be of types: speech, silence, laugh, noise, etc.
- class annotations.Activity.Activity[source]¶
Bases:
object
Create an activity tier from time-aligned tokens.
- append_activity(token, activity)[source]¶
Append a new activity.
- Parameters
token – (str) The token of the tier TokensAlign
activity – (str) Name of the activity
- get_tier(tokens_tier, tmin, tmax)[source]¶
Create and return the activity tier.
- Parameters
tokens_tier – (sppasTier) a tier with time-aligned tokens
- Returns
sppasTier
- set_activities(activities={'#': 'silence', '*': 'noise', '+': 'pause', '@': 'laugh', 'dummy': 'dummy', 'laugh': 'laugh', 'noise': 'noise', 'sil': 'silence', 'sp': 'pause'})[source]¶
Fix the dictionary of possible non-speech activities.
- Parameters
activities – (dict) A dictionary of activities.
The key is the token; the value is the name of the activity.
- class annotations.Activity.sppasActivity(log=None)[source]¶
Bases:
annotations.baseannot.sppasBaseAnnotation
SPPAS integration of the Activity generation.
- __init__(log=None)[source]¶
Create a new sppasActivity instance.
- Parameters
log – (sppasLog) Human-readable logs.
- convert(tier, tmin, tmax)[source]¶
Create an Activity and ActivityDuration tier.
- Parameters
tier – (sppasTier)
tmin – (sppasPoint)
tmax – (sppasPoint)
- Returns
(sppasTier, sppasTier)
- fix_options(options)[source]¶
Fix all options.
Available options are:
duration
- Parameters
options – (sppasOption)
- get_inputs(input_files)[source]¶
Return the the tier with aligned tokens.
- Parameters
input_files – (list)
- Raise
NoTierInputError
- Returns
(sppasTier)