use strict; use Tk; use Win32::MultiMedia::Mci; use Win32::OLE; use Win32::OLE::Const (".*Speech.*"); my $file = shift || 'test.wmv'; my $mw = MainWindow->new(); my $video_frame = $mw->Frame( -width => 352, -height => 240, -background => 'black' )->pack(-expand => 1); my $voice = Win32::OLE->new('SAPI.SpVoice'); my $spc = Win32::OLE::Const->Load($voice); my $timer = $mw->repeat (3000, sub { $voice->Speak("Wow. I'm multitasking.", $spc->{SVSFlagsAsync}); }); my $mci = Win32::MultiMedia::Mci->open($file, shareable => 1, style => 'child', parent => hex($video_frame->id) ); $mci->play(''); MainLoop();