Skip to content

Fix text-to-speech paragraph handling#1259

Closed
totallygeekdom wants to merge 5 commits intoReadYouApp:mainfrom
totallygeekdom:claude/fix-tts-paragraphs-6DIIA
Closed

Fix text-to-speech paragraph handling#1259
totallygeekdom wants to merge 5 commits intoReadYouApp:mainfrom
totallygeekdom:claude/fix-tts-paragraphs-6DIIA

Conversation

@totallygeekdom
Copy link
Copy Markdown

No description provided.

claude and others added 5 commits April 7, 2026 08:03
Exposes content://me.ash.reader.widget.articles/{widgetId} so external
processes (e.g. SmartSpacer) can query unread articles for a given widget
ID. Returns id, feed_name, title columns capped at 15 rows, backed by the
existing WidgetRepository/DataSource config storage.

https://claude.ai/code/session_015nuC2FAJoQJx3qSwMGc7E3
Html.fromHtml() converts <br> to \n and <p>/headings to \n\n, so the
previous split("\n") was breaking mid-paragraph at every <br>. Now splits
on two or more consecutive newlines (paragraph boundaries) and collapses
any remaining inline \n into spaces, so each TTS utterance is a full
paragraph.

https://claude.ai/code/session_015nuC2FAJoQJx3qSwMGc7E3
Add ArticleWidgetContentProvider and fix TTS paragraph batching
The previous fix (split on \n{2,}) still split mid-paragraph when RSS
content wrapped each sentence in its own <p> tag, because Html.fromHtml
emits \n\n at every <p> boundary.

Now collapses all whitespace (including paragraph newlines) into a single
space and only splits when the text exceeds the TTS engine's max input
length (4000 chars), splitting at the last word boundary before the
limit. For typical RSS descriptions this means one utterance per
article read.

https://claude.ai/code/session_015KrBpHUWpJWmDncbCkxd3f
Adds a 'date' column (Long, epoch milliseconds) to the content provider.
Maps article.date.time from the domain Article into the widget Article
data class and passes it through to the MatrixCursor addRow call.

https://claude.ai/code/session_015KrBpHUWpJWmDncbCkxd3f
@totallygeekdom
Copy link
Copy Markdown
Author

i addidently did the pr here instead of my fork my bad im so sorry.

@totallygeekdom totallygeekdom deleted the claude/fix-tts-paragraphs-6DIIA branch April 14, 2026 04:39
@totallygeekdom totallygeekdom restored the claude/fix-tts-paragraphs-6DIIA branch April 14, 2026 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants