[HN Gopher] Show HN: Instantly listen to any URL
       ___________________________________________________________________
        
       Show HN: Instantly listen to any URL
        
       Author : soheil
       Score  : 96 points
       Date   : 2021-08-13 15:57 UTC (7 hours ago)
        
 (HTM) web link (per.quest)
 (TXT) w3m dump (per.quest)
        
       | stcorbett wrote:
       | Wow, thanks, I have tried hacking together something that would
       | work like this for playing text posts while I'm driving or
       | working out. Awesome! :)
        
       | sntran wrote:
       | This is timing. I was just looking for a solution for a friend
       | who has very bad eyesight due to accident. They want to be able
       | to listen to news articles and such.
       | 
       | It would be nice if we can choose languages other than English.
        
       | diplodocusaur wrote:
       | how is this made?
        
         | freediver wrote:
         | Step 1. Page to Text (Eg. Mozilla readability.js)
         | 
         | Step 2. Text to Speech (eg. Mozilla DeepVoice)
         | 
         | Both libraries open-source and free.
        
         | jcun4128 wrote:
         | scraper gets data, send it to a TTS server or it could be just
         | using browser's TTS feature
         | 
         | edit: tried it out it makes an MP3 file so yeah, one way to do
         | it is with a service like AWS Polly that is not free.
        
       | fairytale wrote:
       | I feel like this is a great idea, honestly.
       | 
       | But in my opinion I think that you should make the website fully
       | work without the use of client-side JavaScript.
       | 
       | Not that I dislike JavaScript, in fact, I love it. And it's
       | great! But there are several reasons I think that this would make
       | sense doing.
       | 
       | Here is a detailed explanation for "why":
       | 
       | The website already works without the use of client-side
       | JavaScript, only not the index.
       | 
       | If you for example go to: https://per.quest/https://example.com
       | it will work just fine and redirect you to the generated MP3
       | file.
       | 
       | But if you put https://example.com inside of that input on the
       | website index and have JavaScript disabled it simply won't work.
       | There also is no notice that it does not work without JavaScript
       | enabled.
       | 
       | The solution to this is simple and I think that it would not be
       | hard to change the way you are getting the user given URL from
       | your back-end. What I think would make more sense doing is to
       | just make it work using a URL query parameter.
       | 
       | For example: https://per.quest?url=https://example.com
       | 
       | ... which would then allow you to make use of HTML forms, and
       | simply add the "name" attribute to the input with the value set
       | to "url".
       | 
       | So, this would then work in both cases: when the user hit enter
       | and/or pressed a button inside of the form.
       | 
       | Hope that you will agree with me on this!
        
       | donatj wrote:
       | So this had the _very useful_ feature of finding _two_ separate
       | typos in a post that I had spent many hours proofreading. I 'll
       | need to remember this.
        
       | eat_veggies wrote:
       | 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 audio from per.quest's
       | home page.
        
       | flanbiscuit wrote:
       | Once in a while I use the speech feature of Chrome on my MacOS to
       | have it read articles to me while I work. It's clunky though, it
       | only works (AFAIK) on highlighted text which gets annoying on
       | really long articles, and there's no pause so if I want to
       | "pause" I need to stop it and then redo the highlight starting
       | from where I paused (again, annoying with long articles).
       | 
       | I think I'll be using your service from now on! Browser/OS
       | agnostic, no highlighting, and pausing!
       | 
       | Nice to haves: - ability to pick a different voice - playback
       | speed controls - maybe load the original article in an iframe
       | below the player to be able to follow along
        
       | lambdaba wrote:
       | command-line version:                 curl -L
       | https://per.quest/$URL | mpv - # or aplay etc.
        
         | soheil wrote:
         | ffplay https://per.quest/$URL
        
       | legrande wrote:
       | This works perfectly:
       | 
       | https://jamesclear.com/five-step-creative-process
        
       | spapas82 wrote:
       | Very useful for me to download the filfre articles as mp3 so I
       | will be able to listen to them off line! Thank you!
        
       | arthurcolle wrote:
       | stallman.org sounds even better read aloud
        
       | shorting24x7 wrote:
       | Great free service by the OP btw. We have a feature similar to
       | this in https://narrationbox.com if you are willing to sign up.
       | Almost all URLs work plus we have more than 300 voices to choose
       | from. Disclosure: I am a cofounder.
        
       | axegon_ wrote:
       | I have something pretty similar that I built some time ago for
       | personal use: listen to articles while I am working on things and
       | can't dedicate my attention to anything else. I've been wondering
       | if I should open source it(shove it all into a docker container
       | that people can use locally). I would have loved to be able to
       | publish it as a service but two things are stopping me: 1 is cost
       | to run this and 2 is potential licensing issues I might face with
       | it. But open source... And it runs pretty smoothly on a
       | CPU(albeit a 14-core xeon and an 11-th gen i7).
        
         | yunusabd wrote:
         | Same here, we built a scraper to (more or less) intelligently
         | extract text from websites, I think adding TTS to it would be
         | trivial. I'm guessing the hardware requirements are for the TTS
         | engine? Could the Web Speech API be used to generate the audio
         | locally to bring down costs? Even though you'd lose support for
         | IE and FF.
        
       | kumarm wrote:
       | Nice.
       | 
       | You can do the same in our iOS App:
       | https://apps.apple.com/us/app/id1535903742
       | 
       | Browse to any page and click on "Listen Now" in the app
       | (including logged in page)
        
       | indigodaddy wrote:
       | Very cool but only seemed to catch the first couple of sentences
       | or paragraph for my test URL..
       | 
       | URL used: https://www.bbc.com/news/world-asia-india-43581122
        
       | [deleted]
        
       | hemloc_io wrote:
       | Very cool! I've made a small prototype of something like this
       | before, but what's always gotten me is the limitations of text to
       | speech.
       | 
       | Hopefully some point soon we will have options for more natural
       | speech.
        
       | donclark wrote:
       | Neat! Could you add speed controls, a download audio option,
       | download audio as mp3/webm/etc, and options for different voices?
       | 
       | Why is there no donation option for this project?
       | 
       | Why not add a email signup for updates/news?
       | 
       | What are your options for micro monetization?
        
         | anonymouse008 wrote:
         | Right?! This is honestly a service I would pay for and it's...
         | up for free?
         | 
         | There must be some type of cost on their end. Heck I'm happy to
         | invest!
        
           | turbocon wrote:
           | Not trying to steal from the dev here, but this same ability
           | is built into Pocket that is run by Mozilla, and Mozilla will
           | happily take your money.
        
         | croes wrote:
         | A download option could lead to copyright violation claims.
        
         | RyEgswuCsn wrote:
         | On Chrome: right click on the audio player and "Download audio
         | as..."?
        
       | smbv wrote:
       | Very nice! I tried it out on one of my articles[0] and it worked
       | very well. The only issue I had was that the code samples were
       | spoken. Perhaps ignore <pre> sections?
       | 
       | [0] https://sambhav.saggis.com/en/blog/hashing-data-with-chess
        
       | debarshri wrote:
       | This is one of the best ideas I have seen this year. This is
       | beautiful.
        
       | soheil wrote:
       | If you want a bookmark:                 javascript:audio=document
       | .createElement('audio');audio.controls=true;audio.autoplay=true;a
       | udio.src='https://per.quest/'+document.location.href;audio.style=
       | 'position:fixed;right:0;top:0;height:revert;z-index:10000;';docum
       | ent.body.appendChild(audio);
        
         | [deleted]
        
         | tantalor wrote:
         | "bookmarklet"
        
         | ASTP001 wrote:
         | Your code did not work for me, here is what worked:
         | 
         | javascript:(function(){audio=document.createElement('audio');au
         | dio.controls=true;audio.autoplay=true;audio.src='https://per.qu
         | est/'+document.location.href; audio.style='position:fixed;right
         | :0;top:0;height:revert;z-index:10000;';document.body.appendChil
         | d(audio);})();
        
           | darkstar999 wrote:
           | I also had to engage in an arms race with z-index:999999 to
           | keep it above a website's sticky header.
        
       | [deleted]
        
       | foxfluff wrote:
       | "No video with supported format and MIME type found."
       | 
       | Apparently it's serving zero-byte mp3s?
        
         | soheil wrote:
         | It works best on pages with articles or posts.
        
           | legrande wrote:
           | Yeah I got this error when requesting:
           | 
           | https://news.ycombinator.com/newest
        
           | foxfluff wrote:
           | This is the first URL I tried:
           | gemini://gemini.circumlunar.space/docs/specification.gmi
        
         | SimeVidas wrote:
         | Firefox?
        
           | foxfluff wrote:
           | Yes. 92.0a1.
        
       | eyelidlessness wrote:
       | This is cool! I recently tried to use VoiceOver on my iPhone and
       | it's... astonishingly difficult to use for just text to speech!
       | 
       | One minor request: I realize the form page itself is very
       | minimal, but this would be much more usable on a phone if you set
       | the font-size of the input to at least 16px, and a reasonable
       | viewport meta tag eg `<meta name="viewport"
       | content="width=device-width, initial-scale=1">`
        
         | fairytale wrote:
         | I don't think that the ", initial-scale=1" would be necessary.
         | 
         | Nowadays, <meta name="viewport" content="width=device-width">
         | works just fine.
        
         | 3pt14159 wrote:
         | The bigger the better for this type of page, given that some
         | people that use it may have faulty eyesight.
        
       | egfx wrote:
       | I became aware of a chrome extension that does this. Is there
       | anything that the extension does that this can't do?
       | 
       | https://chrome.google.com/webstore/detail/speechify-for-chro...
        
         | yunusabd wrote:
         | It costs money? Also isn't your question kinda backwards?
        
       ___________________________________________________________________
       (page generated 2021-08-13 23:00 UTC)