Is this somehow using the waybackmachine to scrape pages? When I try some of the classic ssrf paths like file:/// or http://localhost:8080 , I get audio about the internet archive. When I put in https://localhost:443 , I get audio for the default nginx page, which matches what the internet archive has for that url: https://web.archive.org/web/20210620003533/http://localhost/ But putting http://localhost returns the a…
This is how I implemented it. I had already achieved article to "reader mode" extraction by heavily customizing the Kotlin port of Mozilla‘s Readability:
https://github.com/dankito/Readability4J
From the extracted "reader mode" text, I had to do further extraction to get rid of things like image captions, author names, article publish timestamps etc. Also links had to be removed to not let the TTS engine speaking out links.
Then I pass the text via Android's TextToSpeech library and it works very well:
fun trySpeaking(str:String){
fun speak(){
tts?.speak(str, TextToSpeech.QUEUE_FLUSH, null, null)
}
tts?.also {
it.stop()
speak()
} ?: run {
tts = TextToSpeech(appContext) { status ->
println("Speak: $status")
if (status == TextToSpeech.SUCCESS) {
speak()
}
}.apply {
language = Locale.US
}
}
}
If someone wants to do a tl;dr on the article text, they could pass it through SMMRY api (which the Reddit's TL;DR bot uses):On Desktop, one can do text to speech conversion using mozilla TTS:
https://github.com/mozilla/TTS
Or Amazon Polly:
For anyone wanting to give it a try, this "article to audio" will be available in tomorrow's update in my app. The reader mode is already available:
https://play.google.com/store/apps/details?id=com.pranapps.h...
Full disclaimer: I am the developer of the app and the Android version is brand new (released at 4am this morning).