PDA

View Full Version : DS-filter with Text-to-Speech


Ajaja2005
29th March 2009, 13:03
I'm looking for subtitles rendering DirectShow filter (like VSFilter) with text-to-speech ability over SAPI5. Maybe some modifyed version of DirectVobSub(VSFilter). Does it exist? If not, is it difficult to add this feature to VSFilter?

Adub
29th March 2009, 19:48
Text-to-speech? I am afraid it does not exist. Especially because that is incredibly complex. It requires all kinds of things, one of them being an actual data reader, in addition to a "voice". Sorry, but I highly highly doubt you will find what you desire.

Ajaja2005
29th March 2009, 20:07
Text-to-speech? I am afraid it does not exist. Especially because that is incredibly complex. It requires all kinds of things, one of them being an actual data reader, in addition to a "voice". Sorry, but I highly highly doubt you will find what you desire.
For example, KMPlayer has this feature. Using SAPI5 and some TTS engine it's not difficult to teach computer to speak:
#include <sapi.h>
int main(int argc, char* argv[])
{
ISpVoice * pVoice = NULL;
if (FAILED(::CoInitialize(NULL)))
return FALSE;
HRESULT hr = CoCreateInstance(CLSID_SpVoice, NULL, CLSCTX_ALL, IID_ISpVoice, (void **)&pVoice);
if( SUCCEEDED( hr ) )
{
hr = pVoice->Speak(L"Hello", 0, NULL);
pVoice->Release();
pVoice = NULL;
}
::CoUninitialize();
return TRUE;
}

But I do not know DirectShow well, and VSFilter sources are too complicated for me.

JohnnyMalaria
29th March 2009, 20:19
Microsoft Office has built-in text-to-speech so I would suspect it is possible to use the appropriate COM objects with a DirectShow filter (also a COM object). Lots of programming needed but all the nuts and bolts are there if you have Office. Buy a large jar of aspirin.

Midzuki
4th April 2009, 11:05
Buy a large jar of aspirin.

That will be helpful indeed.:D