Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The TimeSpan parameter in the System.Speech.Synthesis.PromptBuilder.AppendBreak(TimeSpan) method is limited to 3043490000 ticks (5:04,349) #3522

Closed
vsfeedback opened this issue Sep 16, 2020 · 1 comment

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


Any TimeSpan above 3043490000 ticks are truncated and don't give the expected behavior. As a workaround, I've had to create an AppendBreak function like this:

using System.Speech.Synthesis;

// ...

private static readonly TimeSpan MaxTicks = new TimeSpan(Int32.MaxValue);

private static void AppendBreak(in TimeSpan Delay, ref PromptBuilder Prompt)
{
var Ticks = Delay.Ticks;

while (Ticks > 0)
{
    if (Ticks >= Int32.MaxValue)
    {
        Prompt.AppendBreak(MaxTicks);
        Ticks -= Int32.MaxValue;
    }
    else
    {
        Prompt.AppendBreak(new TimeSpan(Ticks));
        Ticks = 0;
    }
}

}


Original Comments

Feedback Bot on 7/20/2020, 06:44 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.


Original Solutions

(no solutions)

@ryalanms
Copy link
Member

Speech is not part of .NET Core.

@dotnet dotnet locked as resolved and limited conversation to collaborators Apr 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants