plexus.processors.FilterCustomerOnlyProcessor module
- class plexus.processors.FilterCustomerOnlyProcessor.FilterCustomerOnlyProcessor(**parameters)
Bases:
ProcessorProcessor that filters transcript text to include only customer utterances.
This processor extracts only the portions of a transcript where the customer is speaking, removing all agent/representative utterances. It handles various speaker label formats (Customer:, Contact:, etc.).
Note: This processor does NOT remove the speaker identifiers themselves. To remove speaker labels like “Customer:”, chain this with RemoveSpeakerIdentifiersTranscriptFilter.
- Example usage in YAML:
- item:
- processors:
class: FilterCustomerOnlyProcessor
class: RemoveSpeakerIdentifiersTranscriptFilter
Initialize the processor with configuration parameters.
- Args:
**parameters: Processor-specific configuration parameters
- process(score_input: Score.Input) Score.Input
Process the Score.Input by filtering text to customer utterances only.
- Args:
score_input: Score.Input with text containing transcripts
- Returns:
Score.Input with text filtered to customer speech only