Voice Synthesis Problem (C#)

Voice Synthesis Problem (C#)

Hi all,

I want to port sample voice synthesis program to C#. And I have some problem for C# voice synthesis library.

  1. The function "ProcessAudioAsync" parameters are really correct?
    I couldn't find how to create PXCMAudio and PXCMScheduler.SyncPoint. I think this function's #2 and #3 parameter should have "[Out]".
    Because in the function, 2 parameters are allocated by "gcnew".

  2. And the above function couldn't allocate PXCMAudio correctly. (If fix the above definitions)
    If set break point to gcnew line, and step line -> allocate correctly
    If not stop before gcnew ->  audioInfo and options and timeStamp throws NullPointException. and m_instance value is NULL.

The above problems' line is around #151 in "pxcmvoice.cpp".

And could you add a voice synthesis sample to SDK?

Thanks,

- odakoh

4 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

I got to an answer of my problem.
SyncPoint.Synchronize function is somehow not working in this case. So PXCMAudio output has some nullpoint parameters.

I jsut fixed some source code in pxcmvoice.h and pxcmvoice.cpp. But this is not async function at all.

in pxcmvoice.h line 116
from:


pxcmStatus ProcessAudioAsync(pxcmUID id, PXCMAudio ^%audio, PXCMScheduler::SyncPoint ^%sp);

to:


pxcmStatus ProcessAudioAsync(pxcmUID id, [Out] PXCMAudio ^%audio, [Out] PXCMScheduler::SyncPoint ^%sp);

in pxcmvoice.cpp line 151

from:


pxcmStatus PXCMVoiceSynthesis::ProcessAudioAsync(pxcmUID id, PXCMAudio ^%audio, PXCMScheduler::SyncPoint ^%sp) {

    PXCScheduler::SyncPoint *sp2=0;

    PXCAudio *audio2=0;

    sp=nullptr; audio=nullptr;

    pxcStatus sts=QueryInstance()->ProcessAudioAsync((pxcUID)id,&audio2,&sp2);

    if (sts>=PXC_STATUS_NO_ERROR) {

        audio=gcnew PXCMAudio(audio2,true);

        sp=gcnew PXCMScheduler::SyncPoint(sp2,true);

    }

    return (pxcmStatus)sts;

}

to:


pxcmStatus PXCMVoiceSynthesis::ProcessAudioAsync(pxcmUID id, [Out] PXCMAudio ^%audio, [Out] PXCMScheduler::SyncPoint ^%sp) {

    PXCAudio *audio2=0;

    PXCScheduler::SyncPoint *sp2=0;

    sp=nullptr; audio=nullptr;

    pxcStatus sts=QueryInstance()->ProcessAudioAsync((pxcUID)id,&audio2,&sp2);

    sp2->Synchronize(); // if not sync, audio2 may be null but sts is no error. And cannot synchronize outside of this function.

    if (sts>=PXC_STATUS_NO_ERROR) {

        audio=gcnew PXCMAudio(audio2,true);

        sp=gcnew PXCMScheduler::SyncPoint(sp2,true);

    }

    return (pxcmStatus)sts;

}

Maybe, this fix is not suitable because I read a little bit source code of this SDK.
So if there is wrong fix, please let me know.

The TTS module is broken violating the asynchronous design.
The pxcmvoice code isn't up to date.
We will fix in the next release.
Sorry for the troublesome.

@Xintian
Thank you for the reply.
I understand current status.
I wait for the next release :)

Kommentar hinterlassen

Bitte anmelden, um einen Kommentar hinzuzufügen. Sie sind noch nicht Mitglied? Jetzt teilnehmen