How to integrate a webcam in Delphi projects

Download webcam.zip (804 KB)

Description

This code allows you to integrate pictures from an webcam (or any other video source) in Delphi applications (Delphi7).
You will only need a WDM driver for the video device installed.

Note

The code includes a demonstration project, which shows pictures form the recently used video source.
To choose a different source, just click the "Start" button and select the video source from the appearing window.

Voice output with MS Speech API in Delphi

Description

This code snippet shows you how to integrate synthesized voice output with Delphi.

To realize voice output, you need to install the Mircosoft Speech API SDK on your computer. You can download it here: Speech API SDK (68 MB)

The quick and easy way

And now a short and simple code snippet using voice output with Delphi:
Delphi code:

More possibilities with ActiveX

You also may integrate voice output as an ActiveX component in Delphi. This offers some more options (e.g. select a male or female voice).
To do so, you need install the "Microsoft Voice Text" (Vtext.dll) in Delphi->Components->import ActiveX.
Now, you should have a new ActiveX component, called TTextToSpeech in your component list.
With TextToSpeech1.speak('This is what your computer says'); you can let your program say what ever you want.
To select a different speaker use TextToSpeech.select(i);, whereas i identifies the speaker number.