Re: Text To Speech issues with Read Etexts Activity
Erik and Michael, I think there is some confusion in Hemant's last post. Actually, speech-dispatcher seems to be working just fine on the XO. I had to reboot the XO after installing the RPMs before it would work, but it DOES work. Speech is produced, and callbacks are generated. Even the Activity produces speech and processes callbacks. What I'm thinking now is that it takes a bit longer to process cancelling speech-dispatcher on the XO than it does on my faster Xubuntu box. I stop a thread and create a new one each time I pause and resume speech on a page (because pause and resume in speech-dispatcher doesn't work all that well). So maybe I'm getting in a loop because of that, and maybe sticking some prints in the code my help me figure out where it is happening. So thanks to Mike for that suggestion. It doesn't explain why the nearly identical standalone Python program did not have the issue on the same computer, but I may yet figure that out. James Simmons Hemant Goyal wrote: > Hi, > > I had written a mail to the speechd community regarding the problems > that James was facing some time back. > ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Text To Speech issues with Read Etexts Activity
Hi, I had written a mail to the speechd community regarding the problems that James was facing some time back. Hi, James is using speech-dispatcher on the OLPC laptop. I would just like to ask in the speechd community what is the exact meaning of the following espeak.log messages. (I get similar log messages for each speech synthesis request - either from spd-say or James' Read Etexts activity. 1. Tue Jul 8 17:25:20 2008 [29778] ALSA: Setting access type to INTERLEAVED 2. Tue Jul 8 17:25:20 2008 [30690] ALSA: Setting sample format to S16_LE 3. Tue Jul 8 17:25:20 2008 [31120] ALSA: Setting sample rate to 22050 4. Tue Jul 8 17:25:20 2008 [31778] ALSA: Setting channel count to 1 5. Tue Jul 8 17:25:20 2008 [32067] ALSA: Setting hardware parameters on the ALSA device 6. Tue Jul 8 17:25:20 2008 [32968] ALSA: cannot set parameters (File descriptor in bad state) state=SUSPENDED We cannot hear any audio output during speech-synthesis on the OLPC laptops. Any hints about the problem will be greatly appreciated. And this was the analysis by Hynek from the speechd community. (It would've done well if I had cross posted the mail back then to devel..oh well) 1. Tue Jul 8 17:25:20 2008 [29778] ALSA: Setting access type to INTERLEAVED 2. Tue Jul 8 17:25:20 2008 [30690] ALSA: Setting sample format to S16_LE 3. Tue Jul 8 17:25:20 2008 [31120] ALSA: Setting sample rate to 22050 4. Tue Jul 8 17:25:20 2008 [31778] ALSA: Setting channel count to 1 5. Tue Jul 8 17:25:20 2008 [32067] ALSA: Setting hardware parameters on the ALSA device 6. Tue Jul 8 17:25:20 2008 [32968] ALSA: cannot set parameters (File descriptor in bad state) state=SUSPENDED Hello, on every request to play a sound, the ALSA device must be initialized for the exact audio parameters (22050Hz, 1 channel signed 16 bit data, low endian...). A call of the function snd_pcm_hw_params() is necessary to set these parameters on the device and bring it to the PREPARED state, where it is possible to play audio. The only restriction given in the ALSA documentation is that snd_pcm_hw_params() can't be called when ALSA is in the state RUNNING. (But the documentation is not really complete.) http://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m.html#g98ba19d2800b7d601277fd8c068505da The last message (6) indicates that the call to snd_pcm_hw_params fails. ,,File descriptor in bad state'' is the error message given by alsa. The device is however well in the SUSPENDED state, which contradicts this error message. Since this essential step fails, the audio can't be played and so you don't hear anything. Thus index marks are delivered very fast etc. etc. The exact code inside Speech Dispatcher audio library that fails is: MSG("Setting hardware parameters on the ALSA device"); if ((err = snd_pcm_hw_params (id->alsa_pcm, id->alsa_hw_params)) < 0) { MSG("cannot set parameters (%s) state=%s", snd_strerror (err), snd_pcm_state_name(snd_pcm_ state(id->alsa_pcm))); return -1; } It looks to me that the error message is misleading and the actual problem is elsewhere. Perhaps the audio device in OLPC can't accept these parameters? Perhaps there is some permission problem and it is not possible to bring the audio into the PREPARED state? Perhaps this is a one-channel soundcard and is being blocked by something else? I suggest to try whether 'aplay' works in the exact same conditions (under the user that otherwise runs speech-dispatcher) etc. I did not get around to testing Hynek's suggestion till now however. Best, Hemant On Tue, Jul 15, 2008 at 9:17 PM, Erik Garrison <[EMAIL PROTECTED]> wrote: > On Tue, Jul 15, 2008 at 09:06:02AM -0500, James Simmons wrote: > > Michael, > > > > The activity logs contain no clues. Really no message at all. > > > > The Activity window is present but non-responsive. You can switch to > > the main screen using F3 (the XO equivalent activity-switching key) but > > you cannot shut down the application there. When you switch back to > > Read Etexts the screen is blank, as if something is preventing it from > > repainting. So the app doesn't bail out, it just hangs. I can use > > other activities like the log viewer and the terminal no problem. > > > > And of course nothing like this happens when testing with Xubuntu, or > > when testing the standalone app containing the same code running under > > the Terminal. > > > > How would I obtain the source so that I can assist in debugging? > > Erik ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Text To Speech issues with Read Etexts Activity
On Tue, Jul 15, 2008 at 09:06:02AM -0500, James Simmons wrote: > Michael, > > The activity logs contain no clues. Really no message at all. > > The Activity window is present but non-responsive. You can switch to > the main screen using F3 (the XO equivalent activity-switching key) but > you cannot shut down the application there. When you switch back to > Read Etexts the screen is blank, as if something is preventing it from > repainting. So the app doesn't bail out, it just hangs. I can use > other activities like the log viewer and the terminal no problem. > > And of course nothing like this happens when testing with Xubuntu, or > when testing the standalone app containing the same code running under > the Terminal. > How would I obtain the source so that I can assist in debugging? Erik ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Text To Speech issues with Read Etexts Activity
On Tue, Jul 15, 2008 at 09:06:02AM -0500, James Simmons wrote: > Michael, > > The activity logs contain no clues. Really no message at all. > > The Activity window is present but non-responsive. You can switch to the > main screen using F3 (the XO equivalent activity-switching key) but you > cannot shut down the application there. When you switch back to Read > Etexts the screen is blank, as if something is preventing it from > repainting. So the app doesn't bail out, it just hangs. I can use other > activities like the log viewer and the terminal no problem. Well, from that description, it sounds to me like your UI thread (which is probably your only thread) entering an infinite (or simply very long) loop or is blocked on something that never happens. Tools that I use to diagnose this sort of problem include strace, gdb, and printf-debugging. (Recall that strace and gdb can be attached to a running process.) (Also, let us know if you need more assistance.) Regards, Michael ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Text To Speech issues with Read Etexts Activity
Michael, The activity logs contain no clues. Really no message at all. The Activity window is present but non-responsive. You can switch to the main screen using F3 (the XO equivalent activity-switching key) but you cannot shut down the application there. When you switch back to Read Etexts the screen is blank, as if something is preventing it from repainting. So the app doesn't bail out, it just hangs. I can use other activities like the log viewer and the terminal no problem. And of course nothing like this happens when testing with Xubuntu, or when testing the standalone app containing the same code running under the Terminal. James Simmons Michael Stone wrote: > On Mon, Jul 14, 2008 at 10:46:57AM -0500, James Simmons wrote: > >> ...but after I stop Speech I can't get it to start up again. > > > Do the activity logs contain any clues? > >> Worse, it generally hangs the Activity so I need to reboot the XO to >> quit the Activity. > > > Is the activity window still present but non-responsive to input or is > the activity window completely gone? > > Regards, > > Michael ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Text To Speech issues with Read Etexts Activity
On Mon, Jul 14, 2008 at 10:46:57AM -0500, James Simmons wrote: >...but after I stop Speech I can't get it to start up again. Do the activity logs contain any clues? >Worse, it generally hangs the Activity so I need to reboot the XO to >quit the Activity. Is the activity window still present but non-responsive to input or is the activity window completely gone? Regards, Michael ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Text To Speech issues with Read Etexts Activity
A couple of weeks ago I announced here that I had text to speech working in the Read Etexts activity. I had reason to believe at the time that this was true. I am sorry to report that I was wrong. What is happening is this: Read Etexts works just fine when running under Sugar Emulation on Xubuntu where I do all my development. I assumed that when I installed Hemant's latest RPMs for speech-dispatcher on my G1G1 XO that it would work equally well there. It does not. What happens is that I try to toggle Speech on and off It starts speaking well enough, but after I stop Speech I can't get it to start up again. Worse, it generally hangs the Activity so I need to reboot the XO to quit the Activity. The way I use speech-dispatcher is to invoke it in a separate thread. When I cancel speech the thread is allowed to terminate. To start speech again I need to create a new thread. Sounds like a problem with either speech-dispatcher or threading, doesn't it? Well, before I wrote Read Etexts as an Activity I wrote it as a standalone Pygtk application. Every time I want to add functionality to the Activity I add it to the application first, mostly because the standalone app is easier to test. So I have a standalone app that does exactly the same thing text-to-speech-with-highlighting wise that the Activity does and uses pretty much the same code to do it. I can run this app under Terminal on the XO and start and stop Speech all day long and it works fine. Speech doesn't stop working and nothing hangs. Its only the Activity that doesn't work on that XO. So to summarize I have an Activity that works great everywhere except for the (expletive deleted) XO it was meant to work on. I'm really stuck here. Its clearly an issue with Sugar, not pygtk or speech-dispatcher. Yet I can't recreate the problem in my Xubuntu test environment. If anyone wants to try running my tests on an XO I can provide my Activity plus my standalone app plus instructions from Hemant Goyal on installing speech-dispatcher and its dependencies on the XO. If anyone has ideas on how I can debug this or what the problem is that would be even better. Thanks, James Simmons ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Read Etexts activity on OLPC Activities page
The Read Etexts activity has been committed to Git and I have created a page for it in the Wiki. I would be interested in any feedback on the Activity itself, the Wiki page, or anything else. I want to do this right. Second, I would like to thank everyone on this list that helped me get the Activity this far. I hope to continue work on it and its sister activity View Slides until they are both worthy and useful additions to the Activities catalog for the XO. James Simmons ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Read ETexts Activity is set up
I will change it to readetexts... done Changed the group name which owns the files to readetexts as well. Let me know if there is anything further I can do. --HH. On Tue, Mar 4, 2008 at 2:11 PM, James Simmons <[EMAIL PROTECTED]> wrote: > Henry, > > To be truthful, I was thinking much the same thing as > Chris. I'll be importing my code in about five hours > from now. I'll use whatever path the repository has > at that time. "readetexts" might be a good > alternative. > > Thanks, > > James Simmons > > > > > --- Chris Ball <[EMAIL PROTECTED]> wrote: > > > Hi, > > > >>> Project name : Read ETexts Activity > > > >> Done. Your tree is here: > >> > > > git+ssh://[EMAIL PROTECTED]/git/activities/read > > > > We already ship an activity called Read with the XO > > -- could we call > > the repository for this one something like "etexts" > > to avoid confusion? > > > > - Chris. > > -- > > Chris Ball <[EMAIL PROTECTED]> > > > > ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Read ETexts Activity is set up
Hi, >> Project name : Read ETexts Activity > Done. Your tree is here: > git+ssh://[EMAIL PROTECTED]/git/activities/read We already ship an activity called Read with the XO -- could we call the repository for this one something like "etexts" to avoid confusion? - Chris. -- Chris Ball <[EMAIL PROTECTED]> ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Read ETexts Activity is set up
On Tue, 04 Mar 2008 09:34:20 -0600, James Simmons <[EMAIL PROTECTED]> wrote: Project name : Read ETexts Activity Done. Your tree is here: git+ssh://[EMAIL PROTECTED]/git/activities/read Please follow instructions here for importing your project: http://wiki.laptop.org/go/Importing_your_project Let us know if you have any problems with your tree. Happy hacking. Cheers, -- Henry Edward Hardy [EMAIL PROTECTED] ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Read ETexts Activity
Mr. Simmons, I regret I have not seen your hosting request until now because the subject line under which you submitted it did not indicate that it was such a request. The usual way of requesting a hosting via the devel list would be to submit it with a subject line such as, "Activity hosting application: Read". Now that I have seen your request, I am still as yet unable to process it as you omitted your ssh public key from your application, listing "?" instead. Your application as I have seen it follows: 1. Project name : Read ETexts Activity 2. Existing website, if any : None 3. One-line description : A simple Python Activity for reading Gutenberg etexts 4. Longer description : This will be a fairly trivial activity that allows : paging through Gutenberg etexts. It will support : reading text files (loaded from a USB device) or : Zip files containing a single text file (which is : the easiest format to download to the Journal using : the Browse activity). It will have a user interface : quite similar to the Read activity, and will support : most of the functions of that activity except it : will support plain text files instead of PDFs. 5. URLs of similar projects : http://wiki.laptop.org/go/Read 6. Committer list Please list the maintainer (lead developer) as the first entry. Only list developers who need to be given accounts so that they can commit to your project's code repository, or push their own. There is no need to list non-committer developers. Username Full name SSH2 key URLE-mail - -- #1 jdsimmons James Simmons ? ja.simmons at sbcglobal.net #2 #3 ... If any developers don't have their SSH2 keys on the web, please attach them to the application e-mail. 7. Preferred development model [X] Central tree. Every developer can push his changes directly to the project's git tree. This is the standard model that will be familiar to CVS and Subversion users, and that tends to work well for most projects. [ ] Maintainer-owned tree. Every developer creates his own git tree, or multiple git trees. He periodically asks the maintainer to look at one or more of these trees, and merge changes into the maintainer-owned, "main" tree. This is the model used by the Linux kernel, and is well-suited to projects wishing to maintain a tighter control on code entering the main tree. If you choose the maintainer-owned tree model, but wish to set up some shared trees where all of your project's committers can commit directly, as might be the case with a "discussion" tree, or a tree for an individual feature, you may send us such a request by e-mail, and we will set up the tree for you. 8. Set up a project mailing list: [ ] Yes, named after our project name [ ] Yes, named __ [X] No When your project is just getting off the ground, we suggest you eschew a separate mailing list and instead keep discussion about your project on the main OLPC development list. This will give you more input and potentially attract more developers to your project; when the volume of messages related to your project reaches some critical mass, we can trivially create a separate mailing list for you. If you need multiple lists, let us know. We discourage having many mailing lists for smaller projects, as this tends to stunt the growth of your project community. You can always add more lists later. 9. Commit notifications [ ] Notification of commits to the main tree should be e-mailed to the list we chose to create above [ ] A separate mailing list, -git, should be created for commit notifications [X] No commit notifications, please 10. Shell accounts As a general rule, we don't provide shell accounts to developers unless there's a demonstrated need. If you have one, please explain here, and list the usernames of the committers above needing shell access. 11. Translation [X] Set up the laptop.org Pootle server to allow translation commits to be made [ ] Translation arrangements have already been made at ___ 12. Notes/comments: Since the toolbar will be adapted from the Read toolbar I should be able to use the same translations. Also, since the activity will be simple and entirely in Python it might be good sample code for new Activity developers to look at. The memory requirements of the Activity will be very low, because I'm building a list of pointers to where
Git Repository, etc. for Read ETexts Activity Project
To Whom It May Concern, Two weeks ago I submitted a form requesting hosting for my Activity, a simple Python app that will do everything the Read activity currently does, but which will work on Gutenberg Etexts either in ascii format or in Zip format where the Zip file contains a single ascii text file. These are the formats used for most Gutenberg etexts. The project is shaping up nicely. I don't have everything working 100%, but I'm getting there, and I think the end result will be a very useable and worthwhile Activity. I still have not received any response to my request. I'm thinking about setting up a project in SourceForge instead, but really I think it belongs on the OLPC site. That is where it will be most visible, where I might be able to get help with translation, etc. I am frustrated that I have not received *any* response to my form though. Even an email saying that my request was received would be better than nothing. If I do go with the SourceForge option I'll need a name for the project. I was thinking about setting up one project that could host several Activities, since the ones I'm working on are fairly small. Suggestions for names would be welcome. James Simmons ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: git admin, where are you? (was Re: Read ETexts Activity Text To Speech)
> On Feb 19, 2008 7:55 AM, James Simmons <[EMAIL PROTECTED]> wrote: > > The issue that I'll have with this is making > > it degrade gracefully. Since text to speech looks like it will be > > shipped with the OS, I have to figure out a way to make this feature > > only be visible on laptops that can support it. > > That sounds like a 'not' fell out somewhere. I vote for having TTS > included on every laptop. That is the idea. The basic functionality is already in the builds. SJ ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
git admin, where are you? (was Re: Read ETexts Activity Text To Speech)
On Feb 19, 2008 7:55 AM, James Simmons <[EMAIL PROTECTED]> wrote: > Edward, > > I've looked at Hemant Goyal's pages on speech synthesis and it looks to > be a great deal easier than I expected. The karaoke highlighting looks > doable too. While my first priority will be getting my Activity to have > all of the features that Read has, once I've done that I'd like to try > adding this new feature. All excellent news. > The issue that I'll have with this is making > it degrade gracefully. Since text to speech looks like it will be > shipped with the OS, I have to figure out a way to make this feature > only be visible on laptops that can support it. That sounds like a 'not' fell out somewhere. I vote for having TTS included on every laptop. > Maybe an extra toolbox > tab. I'd also have to figure out a way to test it. I use xubuntu with > the Sugar emulator for testing, so somehow I'd have to get Hemant's > packages on there, probably compiling from source. I'm sure somebody here can help. > I submitted the form to this list to get a git repository, etc. I > haven't heard from anyone on that since. Yo! Anybody home? > I didn't expect instant turnaround on this, *I* expect instant acknowledgment of applications. At least an autoreply message saying how long it should take, how you will be notified when your directory is ready for submissions, and whom to ping if it isn't happening. I have some applications in preparation. If I don't get satisfaction when I submit them, and I don't know whom to ping individually, I will bother lots of people about it. At a minimum, this entire list, as I am in fact now doing. Why isn't management on top of these issues? > and there is definitely no rush, but I am wondering > what to expect. I'd like to have my projects hosted on the OLPC > servers, where I feel they would be most visible. On the other hand I > already have a project on SourceForge and it would be simple enough to > set up another one. > > James Simmons > > > Edward Cherlin wrote: > > >Will it include Text-to-Speech, for the purposes we have discussed on > >this list? If so, could we get some sort of cursor or coloring effect > >to show the illiterate or semi-literate where they are in the text? > > > > > > > > > -- Edward Cherlin End Poverty at a Profit by teaching children business http://www.EarthTreasury.org/ "The best way to predict the future is to invent it."--Alan Kay ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Read ETexts Activity Text To Speech
Edward, I've looked at Hemant Goyal's pages on speech synthesis and it looks to be a great deal easier than I expected. The karaoke highlighting looks doable too. While my first priority will be getting my Activity to have all of the features that Read has, once I've done that I'd like to try adding this new feature. The issue that I'll have with this is making it degrade gracefully. Since text to speech looks like it will be shipped with the OS, I have to figure out a way to make this feature only be visible on laptops that can support it. Maybe an extra toolbox tab. I'd also have to figure out a way to test it. I use xubuntu with the Sugar emulator for testing, so somehow I'd have to get Hemant's packages on there, probably compiling from source. I submitted the form to this list to get a git repository, etc. I haven't heard from anyone on that since. I didn't expect instant turnaround on this, and there is definitely no rush, but I am wondering what to expect. I'd like to have my projects hosted on the OLPC servers, where I feel they would be most visible. On the other hand I already have a project on SourceForge and it would be simple enough to set up another one. James Simmons Edward Cherlin wrote: >Will it include Text-to-Speech, for the purposes we have discussed on >this list? If so, could we get some sort of cursor or coloring effect >to show the illiterate or semi-literate where they are in the text? > > > ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Read ETexts Activity
On Feb 15, 2008 9:12 AM, James Simmons <[EMAIL PROTECTED]> wrote: > Edward, > > I browsed through the links on your Programming For Children pages and > came across the Activity Tutorial > (http://wiki.laptop.org/go/Activity_tutorial). Like the other tutorials > I've seen it quits just as things are getting interesting. Just so. > It gave me > an idea for a new page, which I'd like to call "Beyond Hello World" > which would be on writing an Activity that actually does something > useful. I would cover such topics as how Sugar activities deal with > files, how to use meta data with Sugar activities, how to create a > standalone Python app that can easily be Sugarized, debugging tips, > etc. I would use code snippets from my own Activities for sample code. > I would link to it from the "Sugar" page. Excellent. Just what I was hoping for. Hello, World can be chapter 1, and your contribution chapter 2. Then we shall see what you inspire others to contribute. We also need more information on Sugarizing non-Python apps. > I need to finish my own Activities before I write this, but I think it > would be a way to put my "hard won" knowledge in the Wiki without > messing up anything that's already there. Also, anything I get wrong > could be corrected by others. You don't need to worry about messing up pages. It all stays there in the history and is easy to bring back. But it is also no problem if you add a section of your own to a page without disturbing what is there. > James Simmons > > Edward Cherlin wrote: > > >I started a document on the Wiki, Programming for Children > >(activities), and another, Programming with Children (tutorials). Your > >input would be most welcome. See the OLPC Publications page for more > >suggestions and invitations. -- Edward Cherlin End Poverty at a Profit by teaching children business http://www.EarthTreasury.org/ "The best way to predict the future is to invent it."--Alan Kay ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Read ETexts Activity
Edward, I browsed through the links on your Programming For Children pages and came across the Activity Tutorial (http://wiki.laptop.org/go/Activity_tutorial). Like the other tutorials I've seen it quits just as things are getting interesting. It gave me an idea for a new page, which I'd like to call "Beyond Hello World" which would be on writing an Activity that actually does something useful. I would cover such topics as how Sugar activities deal with files, how to use meta data with Sugar activities, how to create a standalone Python app that can easily be Sugarized, debugging tips, etc. I would use code snippets from my own Activities for sample code. I would link to it from the "Sugar" page. I need to finish my own Activities before I write this, but I think it would be a way to put my "hard won" knowledge in the Wiki without messing up anything that's already there. Also, anything I get wrong could be corrected by others. James Simmons Edward Cherlin wrote: >I started a document on the Wiki, Programming for Children >(activities), and another, Programming with Children (tutorials). Your >input would be most welcome. See the OLPC Publications page for more >suggestions and invitations. > ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Read ETexts Activity
Edward Cherlin wrote: Have you added your hard-won knowledge to the Wiki pages on Sugar and Sugarizing? To be truthful, I'm a little leery of editing Wiki pages. I'm afraid I'm going to mess up somebody else's hard work. We use a Wiki at the office but there is an implied ownership for each article and nobody edits anything without discussing it with the original author. I found that the best information available was in the Pydoc for the Activity class, which I only stumbled upon. I've done Java for years so I'm familiar with JavaDoc but I'm new to python. I was toying with the idea of writing a sort of manual for rank beginners that would cover things like how to set up a development environment, how to use Eric, how to learn python, how to write a python program that runs from the terminal, basic debugging techniques, how to make a python program into an activity, etc. I could use my Activities as samples. It would be my own document, but I wouldn't mind being edited. The thing is, a lot of my hard-won knowledge would seem laughable if it was inserted into the Wiki. Well, we are talking about putting TTS and karaoke-style text marking in Read. Presumably nearly the same code would work in your activity. Or we could fold your code for handling Zip files and Gutenberg's lack of formatting into Read. And we have plenty of pedagogues here to consult. When I said my Activity was trivial I wasn't kidding. I basically stick a GTK label in a scrollable window. I set the background color to white. I read the file from the Journal. If it ends with .zip I unzip the contents to a temporaray file, otherwise I work with the file directly. I read the entire file and make a list of pointers, adding one every 45 lines. I then load the first 45 lines into the label and listen for keydown events. Arrow keys and gamepad keys are used to page forward and backward. I save the current page number as meta info so you can resume the book where you left off. I will support skipping to a page with the toolbox. I might support text search. I will probably support copying text to the clipboard, and I might support adjusting the font size. I will attempt to make it shareable. None of this code is anything to write home about, but it does make a handy etext reader. Adding TTS and Karaoke highlighting to what I have created would be more trouble than its worth. I might be of use teaching children to write simple computer programs. I started a document on the Wiki, Programming for Children (activities), and another, Programming with Children (tutorials). Your input would be most welcome. See the OLPC Publications page for more suggestions and invitations. I'll definitely check them out. James Simmons ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Read ETexts Activity
On Thu, Feb 14, 2008 at 1:39 PM, James Simmons <[EMAIL PROTECTED]> wrote: > Edward, > > I was not planning on anything so fancy. Not a problem. Others can pick up where you have left off. > Basically, I was frustrated > that I had a device that would be wonderfully suited to reading > Gutenberg etexts and no suitable program to do it with. I have written > such an Activity and am putting the finishing touches on it. As I see > it, the selling points of the Activity will be that it can display > etexts one page at a time in a readable proportional font and remember > what page you were on when you resume the activity. The child can find > his book using the Gutenberg site, save the Zip file version to the > Journal, rename it, resume it, and start reading. It will also be good > sample code for new Activity developers to look at, even children, > because it is easy to understand yet it does something that is actually > useful. I have written another Activity which lets you browse through a > bunch of image files stored in a Zip file, and it also would be good > sample code for a new developer, as well as being useful. > > I have been programming professionally for almost 30 years and I still > had a hard time learning everything I needed to know to make an > Activity. Once you know it, it's simple, but collecting that knowledge > a bit at a time is frustrating. The existing tutorials seem to quit > just when things are getting interesting. Have you added your hard-won knowledge to the Wiki pages on Sugar and Sugarizing? > I don't see myself competing with the Read activity or trying to teach > anyone to read. I wouldn't know how. Well, we are talking about putting TTS and karaoke-style text marking in Read. Presumably nearly the same code would work in your activity. Or we could fold your code for handling Zip files and Gutenberg's lack of formatting into Read. And we have plenty of pedagogues here to consult. > I might be of use teaching > children to write simple computer programs. I started a document on the Wiki, Programming for Children (activities), and another, Programming with Children (tutorials). Your input would be most welcome. See the OLPC Publications page for more suggestions and invitations. > James Simmons > > > > > Edward Cherlin wrote: > > >Will it include Text-to-Speech, for the purposes we have discussed on > >this list? If so, could we get some sort of cursor or coloring effect > >to show the illiterate or semi-literate where they are in the text? -- Edward Cherlin End Poverty at a Profit by teaching children business http://www.EarthTreasury.org/ "The best way to predict the future is to invent it."--Alan Kay ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Read ETexts Activity
Edward, I was not planning on anything so fancy. Basically, I was frustrated that I had a device that would be wonderfully suited to reading Gutenberg etexts and no suitable program to do it with. I have written such an Activity and am putting the finishing touches on it. As I see it, the selling points of the Activity will be that it can display etexts one page at a time in a readable proportional font and remember what page you were on when you resume the activity. The child can find his book using the Gutenberg site, save the Zip file version to the Journal, rename it, resume it, and start reading. It will also be good sample code for new Activity developers to look at, even children, because it is easy to understand yet it does something that is actually useful. I have written another Activity which lets you browse through a bunch of image files stored in a Zip file, and it also would be good sample code for a new developer, as well as being useful. I have been programming professionally for almost 30 years and I still had a hard time learning everything I needed to know to make an Activity. Once you know it, it's simple, but collecting that knowledge a bit at a time is frustrating. The existing tutorials seem to quit just when things are getting interesting. I don't see myself competing with the Read activity or trying to teach anyone to read. I wouldn't know how. I might be of use teaching children to write simple computer programs. James Simmons Edward Cherlin wrote: >Will it include Text-to-Speech, for the purposes we have discussed on >this list? If so, could we get some sort of cursor or coloring effect >to show the illiterate or semi-literate where they are in the text? > > > ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Read ETexts Activity
Will it include Text-to-Speech, for the purposes we have discussed on this list? If so, could we get some sort of cursor or coloring effect to show the illiterate or semi-literate where they are in the text? On Thu, Feb 14, 2008 at 12:22 PM, James Simmons <[EMAIL PROTECTED]> wrote: > 1. Project name : Read ETexts Activity > 2. Existing website, if any : None > 3. One-line description : A simple Python Activity for reading Gutenberg > etexts > > 4. Longer description : This will be a fairly trivial activity that > allows > : paging through Gutenberg etexts. It will > support > : reading text files (loaded from a USB device) or > : Zip files containing a single text file (which > is > : the easiest format to download to the Journal > using > : the Browse activity). It will have a user > interface > : quite similar to the Read activity, and will > support > : most of the functions of that activity except it > : will support plain text files instead of PDFs. > > 5. URLs of similar projects : http://wiki.laptop.org/go/Read > > 6. Committer list >Please list the maintainer (lead developer) as the first entry. Only list >developers who need to be given accounts so that they can commit to your >project's code repository, or push their own. There is no need to list >non-committer developers. > > Username Full name SSH2 key URLE-mail > - -- >#1 jdsimmons James Simmons ? [EMAIL > PROTECTED] >#2 >#3 > ... > >If any developers don't have their SSH2 keys on the web, please attach them >to the application e-mail. > > 7. Preferred development model > >[X] Central tree. Every developer can push his changes directly to the >project's git tree. This is the standard model that will be familiar to >CVS and Subversion users, and that tends to work well for most > projects. > >[ ] Maintainer-owned tree. Every developer creates his own git tree, or >multiple git trees. He periodically asks the maintainer to look at one >or more of these trees, and merge changes into the maintainer-owned, >"main" tree. This is the model used by the Linux kernel, and is >well-suited to projects wishing to maintain a tighter control on code >entering the main tree. > >If you choose the maintainer-owned tree model, but wish to set up some >shared trees where all of your project's committers can commit directly, >as might be the case with a "discussion" tree, or a tree for an individual >feature, you may send us such a request by e-mail, and we will set up the >tree for you. > > 8. Set up a project mailing list: > >[ ] Yes, named after our project name >[ ] Yes, named __ >[X] No > >When your project is just getting off the ground, we suggest you eschew >a separate mailing list and instead keep discussion about your project >on the main OLPC development list. This will give you more input and >potentially attract more developers to your project; when the volume of >messages related to your project reaches some critical mass, we can >trivially create a separate mailing list for you. > >If you need multiple lists, let us know. We discourage having many >mailing lists for smaller projects, as this tends to >stunt the growth of your project community. You can always add more lists >later. > > 9. Commit notifications > >[ ] Notification of commits to the main tree should be e-mailed to the list >we chose to create above >[ ] A separate mailing list, -git, should be created for > commit >notifications >[X] No commit notifications, please > > 10. Shell accounts > >As a general rule, we don't provide shell accounts to developers unless >there's a demonstrated need. If you have one, please explain here, and >list the usernames of the committers above needing shell access. > > 11. Translation >[X] Set up the laptop.org Pootle server to allow translation commits to be > made >[ ] Translation arrangements have already been made at ___ > > 12. Notes/comments: Since the toolbar will be adapted from the Read toolbar > I should >be able to
Read ETexts Activity
1. Project name : Read ETexts Activity 2. Existing website, if any : None 3. One-line description : A simple Python Activity for reading Gutenberg etexts 4. Longer description : This will be a fairly trivial activity that allows : paging through Gutenberg etexts. It will support : reading text files (loaded from a USB device) or : Zip files containing a single text file (which is : the easiest format to download to the Journal using : the Browse activity). It will have a user interface : quite similar to the Read activity, and will support : most of the functions of that activity except it : will support plain text files instead of PDFs. 5. URLs of similar projects : http://wiki.laptop.org/go/Read 6. Committer list Please list the maintainer (lead developer) as the first entry. Only list developers who need to be given accounts so that they can commit to your project's code repository, or push their own. There is no need to list non-committer developers. Username Full name SSH2 key URLE-mail - -- #1 jdsimmons James Simmons ? [EMAIL PROTECTED] #2 #3 ... If any developers don't have their SSH2 keys on the web, please attach them to the application e-mail. 7. Preferred development model [X] Central tree. Every developer can push his changes directly to the project's git tree. This is the standard model that will be familiar to CVS and Subversion users, and that tends to work well for most projects. [ ] Maintainer-owned tree. Every developer creates his own git tree, or multiple git trees. He periodically asks the maintainer to look at one or more of these trees, and merge changes into the maintainer-owned, "main" tree. This is the model used by the Linux kernel, and is well-suited to projects wishing to maintain a tighter control on code entering the main tree. If you choose the maintainer-owned tree model, but wish to set up some shared trees where all of your project's committers can commit directly, as might be the case with a "discussion" tree, or a tree for an individual feature, you may send us such a request by e-mail, and we will set up the tree for you. 8. Set up a project mailing list: [ ] Yes, named after our project name [ ] Yes, named __ [X] No When your project is just getting off the ground, we suggest you eschew a separate mailing list and instead keep discussion about your project on the main OLPC development list. This will give you more input and potentially attract more developers to your project; when the volume of messages related to your project reaches some critical mass, we can trivially create a separate mailing list for you. If you need multiple lists, let us know. We discourage having many mailing lists for smaller projects, as this tends to stunt the growth of your project community. You can always add more lists later. 9. Commit notifications [ ] Notification of commits to the main tree should be e-mailed to the list we chose to create above [ ] A separate mailing list, -git, should be created for commit notifications [X] No commit notifications, please 10. Shell accounts As a general rule, we don't provide shell accounts to developers unless there's a demonstrated need. If you have one, please explain here, and list the usernames of the committers above needing shell access. 11. Translation [X] Set up the laptop.org Pootle server to allow translation commits to be made [ ] Translation arrangements have already been made at ___ 12. Notes/comments: Since the toolbar will be adapted from the Read toolbar I should be able to use the same translations. Also, since the activity will be simple and entirely in Python it might be good sample code for new Activity developers to look at. The memory requirements of the Activity will be very low, because I'm building a list of pointers to where each page begins rather than storing the document in memory. ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel