Script Editor – The Game Plan

If you read the last post, you understand the problem that I am trying to solve.  I need a way to automate the creation of a script for HabloHindu.com.  It should keep track of the word of the day in Spanish/English/Hindi.  Allow for people to know what they need to do, e.g. review a script, answer a question, translate something, record something, etc.  It needs to mix together the various recordings, and post the final results to WordPress. 

In this post, I hope to outline my current approach.  I plan to keep a running journal of my progress, which will be helpful to me later on to review, and will hopefully be helpful for you as well.

Selection of tools:  I am going to write this targeting a LAMP stack (linux, apache, MySql, Php).  My development environment is a windows vista laptop, but my server is a linux server running at DreamHost.  Other than that, my development and production environments are the same.

Let me give you an idea of the flow:

1) Log in to the application

2) See list of scripts with status (Just started; Need review; Need recording; Ready; Published)  Each script will have a notes section displayed on the status screen that will allow for Sara and I to communicate with each other.

3) On the list of scripts page, there will be a “new script” button.  This will allow for you to create a new script.  Let us walk through the new script process

4) Clicking on the “new script” button will take you to the “script edit” page with some fields filled in with defaults, and others that will have to be filled in.

Publish Date: <default to the next day after the last script in the system>

Word of the Day in English:

word of the day in Spanish:

Word of the day in Hindi (devanagari):

Word of the day in Hindi (English Transliteration):

Word of the day in Hindi (Spanish Transliteration):

Notes:

Status: <default to “Just started”>

Then there will be a button to “save”

5) After clicking “save”, you will see the script “header” information in read only mode.  And there will be a button to “add a line”.  When you click this, you will be taken to a page that looks exactly like this one, but will have a new “script line” at the bottom, with the following fields:

Speaker (drop down with a list of speakers) (currently: Sara, Meena, Nariandas)

Spanish:

English:

Notes:

6) After clicking the “save” button, you will be taken to the read-only mode.  And you will have some basic functions like, move line up, move line down, insert line here, delete line, go to script list page, edit script header and the like.

7) The above takes care of the script editing.  Now, to the recording.  to each script line in the recording, I will add  a little Java Applet (Like Java Sonics ListenUp voice recording Applet) or a flash based record like Evoca)

8) Then a good next step will be to have a page by speaker with all the lines.  That way I can sit with Meena or Nariandas and just record all the lines at one time.

9) Mix the audio together here is a discussion about this: ask.metafilter.com/21381/Merge-mp3s-with-PHP

10) post the information to HabloHindi wordpress using the webservices interface or directly into the database…

so, it is a very basic design..  I’ll keep you posted on my progress…

Script Editor – The Problem

I am working with Sara, a friend from Venezuela to create a Spanish site to teach Hindi.  It launches tomorrow with a Hindi word of the day with an audio cast and text for Spanish speakers at HabloHindu.com.  It has required a lot of work to create some relatively short programs.  And most of that work had to do with things that could be automated.

Let me explain our process so far:

1) Create a script.  You can see the list of scripts we have created so far:

www.ispeakhindi.com/wiki/index.php?title=En_Espa%C3%B1ol

You have to create a link to each script.  Put the text in English/Hindi (if I am working on it) and in Spanish/English/Hindi if Sara is working on it.  Then if we have questions or need help about the script, we add a note.  The other person can look at recent changes in the wiki to see this.  It can take a while to create a script.  Each of these scripts probably represent at least 2 hours of work.

2) Record the Spanish part.  After the script is ready, Sara will record the Spanish part.  You can see examples of this on this page: www.ispeakhindi.com/wiki/index.php?title=Make_organised_our_work_together_for_august

Listen to some of the files under “recording by Sara”.

3) Then we have to record the Hindi part.  To do this, I need a list of the Hindi words/phrases and who says them (Nariandas or Meena).  To create that list, I scan through the scripts looking for Hindi.  Then I created another wiki page to track this: www.ispeakhindi.com/wiki/index.php?title=Recordings_that_Meena_and_Nariandas_need_to_make

Then I sit with Meena and Nariandas to record the Hindi.  Recording each of these files took some time in Audacity.  I had to give each file a name that reflect to the word.  I had to click “OK” on the MP3 properties dialog box.  All that time adds up.  It probably takes at least a minute for each of the phrases/words…

4) Then I have to mix the Spanish and Hindi together.  I listen to the Spanish in Audacity and read along with the script.  Sara leaves pauses for me to know where the Hindi needs to go.  Then I find the right Hindi file, insert it in.  I try to match the volume between the two recordings, but have not been able to do a good job at this.   Editing each of the recordings probably takes 15 minutes.

5) Then a post needs to be created in WordPress on HabloHindu.com.  This means copying the script from the wiki to WordPress and removing all the English.  Also, have to upload the final recording and set it up in the PodPress.  This probably takes about 5 minutes a recording.  And set the go live date to the appropriate day.

Here are the totals for one script:

2 hours script creation/editing

?? Record by sara

15 minutes to record the Hindi

15 minutes to mix together

5 minutes to post on HabloHindu

Therefore, each 30 second – 1minute HabloHindu episode is currently taking around 2 and a half hours to create.  I think it might be possible to get that down to 30 minutes or less using an automated solution.  I’ll talk about that in the next post.

Looking for a way to create PDFs programmatically that have Hindi

Trying to automate the creation of PDFs with the Hindi flashcards for www.ISpeakHindi.com.  I am open to anything that can run on Windows or Linux.    I prefer something that would run on Linux so I can put it on the webserver.  So I am focused on looking at solution in PHP or Ruby.

I found a wonderful PDF creation library for PHP, but it does not support unicode:

www.fpdf.org/

I found a “not quite ready for PRO” version that has been internationalized

acko.net/blog/ufpdf

I could not get it to work with the Hindi characters, i.e. क ख ग घ etc.

I found PDF::Writer for Ruby, but still no luck..

In the process of looking for this, I found this Ruby on Rails screen cast in Hindi:

www.fromjaipur.com/?p=4

Rails working with DreamHost!

Yes, I too have joined the ranks of the people that successfully gotten a rails app to work on DreamHost.com!  This is something that I have been toying with since August 2007!

There have been lots of things that helped:  One is this posting: www.railshosting.org/#dreamhost

the other is advice from a Houston Ruby user’s group member, Neils, that said to make rails run in the “root” of the domain and not in a sub folder.

Anyway, here is my rails app: a simple Hindi<->English dictionary foo.ispeakhindi.com 

Now that I have been able to get a rails app from dev to pro, it is time to start doing some serious rails development.  Now, I need to get my dev environment up to date with the latest version of rails.  There were some surprises like “start_form_tag” and “end_form_tag” are no longer used.  And I really need to get a GUI to start doing my development in.  I think I will try NetBeans though I have heard it is slow…

And I think I need to get capistrano working to make it a one click to deploy.  Got to get source control up and running.  Maybe I should install redmine to do my project/version management?  Need to figure out what I am going to use to write test scripts in.  Rspec?  Anyway, lots to do… but I can see the process from beginning to end.. So now time to start get cranking…

Team Viewer

Need to share your desktop or remote control somebody else’s computer to explain something or fix something?  Consider using Team Viewer.  It works  behind routers.  And it seems to work pretty well.  Plus it is free:

www.teamviewer.com/index.aspx

beyond “href=mailto:”

Next time you create a “Mailto:” link, consider adding a subject, beginning body, and maybe some people to CC.  I found this page really useful:

www.ianr.unl.edu/internet/mailto.html

Javascript library and tools

mashable.com/2007/10/05/javascript-toolbox/

www.dojotoolkit.org/

Drag and Drop Lists

www.dynamicdrive.com/

Write some code online and see it run

This is an interesting site. You can write code in Pascal, basic, C++, ASM, Perl, JavaScript, HTML??, Flex, MySql, Prolog, LISP, Math? and see it run. All from your web browser.
www.codeide.com/

SQL Toolbox

Mashable has published a list SQL TOOLBOX: 20+ Tools and Lessons About SQL

Here are the items that I found interesting and useful. (I had my MySql and Microsoft Sql filter on, so I didn’t bother to look at anything Oracle related.)

25 SQL Commandments – These hints–many of them previously unpublished–can help you avoid the plague of poorly written SQL statements
This is a useful list of reminders and ideas to help you write the best performing SQL.

Comparison of different SQL implementations – Compares the SQL 2003 Standard, PostgrSQL 8.2.0, DB2 Express-C v. 9.1, MS Sql Server 2005, MySql 5.0.18, and Oracle 10g r2.

This should be very useful if you are trying to move a database between servers or trying to decide which database to use.

Instant SQL Formatter – Formats SQL for different Sql server implementations. Seems very useful. Especially if you are switching between databases.

MySql Cheat Sheet – Lists key MySql commands and syntax.

Sql on Rails – “Taking the VC out of MVC” – seems interesting, so mainly a note to myself to checkout later.