Tom Krcha's FlashRealtime

Hey amigo! These are my notes. I'm Platform Evangelist with Adobe.


Real Text-To-Speech For Your Flash Apps

March 2nd, 2010

Acapela - Voice as a ServiceText-to-speech has been around for many years, but you know it has never really worked properly. It sounded like a metal can, had issues with different languages, and so on. But I have good news for you.

Acapela created a SaaS (software as a service) offering for Text-To-Speech, which finally sounds pretty cool and I was quite amazed by it — even the Czech language is included :) This could be a very useful usability feature for your games. You can use it to read a story, chat messages, alerts and so on. I can even imagine this in your enterprise apps as a helper. I presume that having this functionality as a service can really reduce the size of your application (the voice bank must be huge) and CPU load, plus you also have all updates included.

They support ~20 languages in nearly 300 voice variations: Arabic, Czech, Danish, Dutch, English, Faroese, Finnish, French, German, Greek, Icelandic, Italian, Norwegian, Polish, Portuguese, Portuguese, Russian, Spanish, Swedish, Turkish.

Basic sample - more samples

* Built using my evaluation account - it should work till 25th March 2010

Basic code for retrieving voice from a string could look like this:

import com.acapela.vaas.BasicVaas;
import flash.media.*;
import flash.net.*;
 
var myVaas:BasicVaas = new BasicVaas();
 
myVaas.accountLogin = "your_account_login";
myVaas.applicationLogin = "your_application_login";
myVaas.password = "your_application_password";
 
myVaas.generateMessage("heather22k", InputText.text);
 
function messageAvailableEventListener(event:Event)
{
	var channel:SoundChannel = 
		BasicVaas(event.target).requestedSound.play();
}
 
myVaas.addEventListener(BasicVaas.MESSAGE_AVAILABLE, 
			messageAvailableEventListener);

- Acapela is a paid service, check pricing.
- API documentation (AS3).
- Check Acapela.tv

Comparison of Flash vs. HTML5 video CPU usage

February 28th, 2010

I’d like to recommend this very interesting comparison article on Flash vs. HTML5 video CPU usage.

Flash Player: CPU Hog or Hot Tamale? It Depends.

Windows test results - check article for more - good reading

(Source: StreamingLearningCenter.com)

Deploying Flash P2P app on Facebook

October 14th, 2009

The magic of P2P apps is definitely their distribution and deployment. In this article we are going to deploy our Stratus P2P Flash video-chat to Facebook using Facebook ActionScript API and fingerprint exchange service in PHP and MySQL.

This article is a follow-up of my Adobe MAX 2009 session: Social Media Experiences with Flash Media and RTMFP.


Read the rest of this entry »

List of RTMP clients
control FMS remotely

August 24th, 2009

When building realtime applications, you would probably like to control Flash Media Server or LiveCycle DS remotely to push messages from 3rd party software.

RTMP client

The use-case is obvious, connecting two realtime/messaging services together. Imagine a pipe of messages on one side utilizing e.g. JMS (Java Message Service - http://java.sun.com/products/jms/) and on the other side FMS, which is pushing this into Flash Player clients.

In most cases, connecting RTMP servers with 3rd party services might be very useful, so this is why I have created this list of RTMP clients…
Read the rest of this entry »

Basics of P2P in Flash

May 31st, 2009

This videotutorial explains the basics of working with P2P (peer to peer) in Flash Player 10.

I made this tutorial with focus on simplicity of this fantastic feature of Flash. There are bunch of articles and examples in the world showing how to create your own P2P app, but most of them are very complex or hard to catch.

In this tutorial you’ll get idea how to connect two different peers and exchange data between them with ActionScript 3.0 and Flex only.

Prerequsites:
- familiarity with ActionScript 3 and Flex Framework
- Flash Player 10 Debug version installed download
- Flex Framework 3.3+ download

P2P in Flash

Videotutorial: http://flashrealtime.com/tuts/p2p-in-flash.html (20 min.) 
Try: P2P demo (run in two browsers, explained in video)
Source: download P2P.mxml.zip

Note: Programatically the main P2P logic is not to connect peers together just via NetConnection, but by defining peerIDs to NetStream.
PS: don’t forget to change your Flex Compiler settings to use Flash Player 10
Btw: nice P2P Mill Game done by my friend Pavel Šimek http://nestor.cz/mill/ 

Good Luck!