Pointing a voice assistant at the right two sentences
This tool builds SpeakableSpecification structured data in JSON-LD. Speakable marks the parts of a page that are best suited to being read aloud by text-to-speech, usually the headline and a short summary. You enter the page URL, an optional title and one or more CSS selectors that match those parts of your page, and the generator returns a WebPage block with a speakable property listing your selectors.
Unlike most schema, speakable does not contain the text itself. It contains pointers to elements on the page, and whatever reads the markup looks up those elements and reads their text. That makes the selectors the whole job: if they match the wrong element, or nothing, the markup is valid but useless.
Where speakable is actually supported
Be clear-eyed about this before you spend time on it. Google documents speakable as a beta feature for news publishers, used by Google Assistant to read news content aloud, and available for English-language content for users in the United States. Outside that, no major search engine or assistant has documented using it. It is not a ranking factor, it will not create a voice result for a product page, and the documentation notes it may change.
For a news publisher in that market, it is a small, low-risk addition. For everyone else, the markup does no harm, but the value is in the writing it forces: a crisp headline and a two or three sentence summary that make sense when heard without a screen. Those same lines are what answer engines tend to quote, which is why the work carries over. To see whether a page is written for spoken answers in general, try the Voice Search Readiness checker.
A working example, page and markup together
The selectors in the markup match a class on the headline and a class on the summary paragraph:
<!-- The page content the selectors point at -->
<h1 class="headline">City council approves new cycle lanes</h1>
<p class="summary">The council voted 9 to 2 on Tuesday to build 14 km of protected
cycle lanes. Work starts in March and should finish by the end of next year.</p>
<!-- The generated markup -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebPage",
"name": "City council approves new cycle lanes",
"url": "https://news.example.com/cycle-lanes",
"speakable": {
"@type": "SpeakableSpecification",
"cssSelector": [".headline", ".summary"]
}
}
</script>Schema.org also allows an xpath list instead of CSS selectors. This generator outputs CSS selectors only, which are easier to maintain; use one method or the other, not both.
Choosing selectors and passages that sound right
Google's guidance is to aim for about 20 to 30 seconds of audio, roughly two or three sentences. Pick a headline and a summary that answer the story's main question on their own. Avoid sections full of links, tables, captions, datelines or abbreviations, because they sound confusing when read aloud. Lead with the fact, keep sentences at a natural spoken length, and spell out anything ambiguous.
Use specific selectors that match one element each, such as a class on the summary paragraph. Avoid broad selectors like main, article or p, which match the whole story and would be read for minutes. Test each selector in your browser's developer console with document.querySelectorAll(".summary") and confirm it returns exactly the element you intend.
Merging speakable into existing Article or WebPage markup
If the page already has NewsArticle, Article or WebPage markup, add the speakable property to that object rather than pasting a second, separate block. One object describing the page is cleaner than two. The Article Schema Generator builds the article block you can add it to.
WordPress
Add a class such as summary to your standfirst paragraph in the block editor (Advanced, Additional CSS class). Then either paste the generated block with a header code plugin scoped to news posts, or, if your SEO plugin outputs Article markup, use its schema filter to add the speakable property there.
Custom templates
Put stable class names on the headline and summary in the article template and print the speakable property from the same template. Then the selectors cannot drift away from the markup when a designer renames a class.
How speakable markup breaks over time
The usual failure is drift: a redesign renames .summary to .standfirst, nothing visibly breaks, and the markup now points at nothing. The second is selecting too much, so the assistant would read the whole article. The third is pointing at content that is hidden, loaded later by JavaScript, or different from what visitors see. Re-check your selectors whenever the article template changes.
Testing before you ship
Check that the JSON-LD parses with our JSON-LD Validator or the Schema Markup Validator, and test each selector against the live page. These tools check structure, not whether an assistant will use the markup. Finally, read the selected text aloud, or play it through any text-to-speech tool, and rewrite it until it sounds natural on its own.