Jump to content

Mini English Tools


tkminh
 Share

Recommended Posts

Hi everyone,

I just made a small program to learn Listening English, from website VOA. It will get content from source VOA, download file audio mp3, and translate to selected language, in this case is Vietnamese.

Please download in attachment.

Hope you can use it easily, then give me comment or bug. :graduated:

VOA - learning 1.1.au3

Link to comment
Share on other sites

Hi everyone,

I just made a small program to learn Listening English, from website VOA. It will get content from source VOA, download file audio mp3, and translate to selected language, in this case is Vietnamese.

Please download in attachment.

Hope you can use it easily, then give me comment or bug. :graduated:

I do like your idea but I get errors after it has been loaded : "Error" without explanations and crash !

I can see the text and the translation but I cannot go further. There is a sound problem.

I don't know which file must be played : the one on the site, or the file in the current directory.

Your code is not sufficently documented for me.

A progress bar should be also very usefull.

Thanks,

(French Windows XP)

Edited by ldub
Link to comment
Share on other sites

  • 1 month later...

Ok, found your error.

You set the filename as the title.

When file was downloaded via InetGet it renamed sound file to one that could be saved.

Revisions:

#region Main

dim $oIE
dim $sound
dim $arrHREF[1]
dim $soundLength
dim $MyFileName ;added variable for file name

For $oLink in $oLinks
        $sLinkText = _IEPropertyGet($oLink, "innerText")
        If StringInStr($sLinkText, "download MP3") Then
            dim $hDownload
            $MyFileName = String(getFileName($oLink.href))  ;save name file to be saved as
            $hDownload = InetGet($oLink.href, getFileName($oLink.href) & "",1,1)
            Do
                Sleep(250)
            Until InetGetInfo($hDownload, 2)

            ExitLoop
        EndIf
    Next

    $contentResult = getTranslate($contentSource)
    _GUICtrlRichEdit_SetText ($theSource,$contentSource)
    _GUICtrlRichEdit_SetText ($theResult,$contentResult)

    loadSound($MyFileName) ;loading correct filename
    ;loadSound($title & ".mp3") ; commented out your line
    Sleep(1000)

Things to think on.

1: is there a better way to check the Internet connection? (I get 2 cmd boxes. one is from the ping.exe command. Don't see command for second box.)

2: File Cleanup.

a: name mp3 files with same name, one you specify. (Example: soundclip.mp3)

b: create separate directory and delete *.mp3 on exit

3: Error cleanup and exit cleanup.

I found a bunch of iexplorer.exe (hidden) that I had to end task while debugging this.

Also found this when I exit via windows close X.

4: some display issues with your sound bar.

5: if you select another article while 'Select' button is gray. Then click select again. It does not select new article. (Gray out list while loading also?)

5: Functionality: Add a way to click/highlight one or more words on left textbox, and have translated text highlight. This would require much more work. Probably multiple Google translate sessions.

6: More language support (Site has many languages.)

PS - Using Windows XP US English version

:) over all found it an intereasting project.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...