Interfacing to the Currah uSpeech


/*
	ZX Spectrum and the Currah uSpeech lib demo
*/
#include <spectrum.h>
#include <zxcurrah.h>
#include <stdio.h>
#include <stdlib.h>

/* 'Hello" word for direct mode */
char hello[] = {PH_H, PH_E | PH_PITCH, PH_LL, PH_O, PH___, PH_END};

int main()
{
	if ( !currah_detect() )  
	{
		printf ("CURRAH uSpeech is present\n");
	}
	else
	{
	printf ("Hello (from the direct engine)\n");
	currah_direct (hello);
	sleep (1);
	printf ("\nHello (internal conversion functions)\n");
	currah_speech ("hE(ll)o");
	sleep (1);

	printf ("\n\nI am a ZX Spectrum talking\n");
	currah_speech ("aY em a zed eks spEctrum tokin");

	}

	printf ("\n\n\n(Program end).\n");
}

 
examples/snippets/zxspectrum/zxcurrah.txt · Last modified: 2007/10/23 14:36 by stefano
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki