Is there an API to read ePub books?
Solution 1
- EPUB sharp beta - http://sourceforge.net/projects/epubsharp/
Also, you can check out the draft of the ePub 3 spec here
Edit: Fixed the link
EPUB Sharp has not been updated since a long time.
Here's a step by step procedure in building your own (for iPhone, IMO it's good starting point).
Solution 2
For DRM-free html based ePubs(there are also dtbook based ePubs, but I've never seen one) you can simply use a few libraries to build a reader:
- An html render control, since the content is based on xhtml 1 and css
- A zip library because the container is a zip archive
- An xml library to parse the meta data files
For 2. and 3. there are many libraries, some of which support silverlight/WP7. No idea about 1, but I suspect WP7 already offers such a control.
Solution 3
I would imagine that extracting the contents of the book, as string or simple text and passing it into the Microsoft Speech SDK (SAPI) would work. Functions therein can be called from within c#. Did you try that already?
Zain Rizvi
"I'm gonna need more bug spray" Software Engineer, I've worked at Google and Microsoft, in of the AI Platform Notebooks and Azure Web App teams respectively My blog, where I post interesting things I learn about tech, psychology, business, and self-improvement: http://zainrizvi.io
Updated on June 22, 2022Comments
-
Zain Rizvi almost 2 years
I'm trying to create an ebook reader for WP7. So far I haven't been able to find any API to read ePub books with.
Thanks, Zain
-
CodesInChaos almost 13 yearsYour second link leads to epub sharp too, and not to the epub spec. And is there any documentation on epub sharp? And I can't find the code in the repo either.
-
CodesInChaos almost 13 yearsI'm not the downvoter, but I don't see how this answers the question. I see no indication that the OP needs any text-to-speech. I think he wants to read and render an epub file.
-
drharris almost 13 yearsThere's no need to downvote. The OP said "epub reader", which could easily be misconstrued as an actual reader (with voice) for the epub format. In this case, he meant something to extract and display the data, but I can see how confusion happened.