Docs and guides
Search
K

Filter content

Learn how to filter what should be included or excluded from audio generation.
Create an HTML filter to include or exclude elements or words from audio generation.
For example, if you want to exclude <h2> subheadings from audio generation, you can add a filter to do so via the dashboard or API.
Please note that HTML filters are not supported in the TTS Editor or when using the manual_segment type in the API.
Dashboard
API
  1. 1.
    In project Settings go to HTML filters.
  2. 2.
    Click +.
  3. 3.
    Select Type.
  4. 4.
    Enter value.
  5. 5.
    Click Add.
  6. 6.
    Select Include or Exclude.
  7. 7.
    Select Organizaiton or Project.
  8. 8.
    Click Add to save.
Use the /html_filters endpoint in the API.
When specifying elements, classes, or other HTML attributes, provide only the name or identifier. Avoid prefix characters like '<', '.', '#', or any other syntax. The only exception is with 'element_xpath'.

HTML elements

To make HTML filters as flexible as possible, you can define them based on the following:

element_type

The name of the tag representing the element.
Examples: <H2>, <blockquote>, <ul>, <table> etc.

element_class

The class attribute of an element. This filter will be applied to any element that contains the class.
Examples: .header, .footer, .aside etc.

element_id

The class attribute of an element.
Examples: #advert, #related, #navigation etc.

element_data

The data attribute of an element.
Examples: data-include, data-exclude etc.

element_xpath

The XPath specifying the elements.
Example: //*[@role='dialog'] etc.
value
The string value contained within an element. This filter will be applied to any element that contains the value.
Example: “Sponsored” etc

Include or exclude

For each HTML filter, you have the option to 'include' or 'exclude'. By default, the setting is set to 'exclude'.
  • If you select 'include', the content identified by the HTML filter will be incorporated into the audio generation.
  • If you select 'exclude', the content identified by the HTML filter will be omitted from the audio generation."

Scope

For each HTML filter, you have the option to apply it to 'Organization' or 'Project'.
  • If you select 'Organization', then the filter will apply to all content projects in your account.
  • If you select 'Project', then the filter will only apply to the project you're in.
When you create a filter, it affects only new content items. To apply the filter to existing content items, you must regenerate them.