I was tiring to get the result with timespan, The mean Ida it's make automatic Speech Recognition to VTT(subtitle) using Google Api, but the problem is given me all result in same time so I' cant know the timespan.
var speech = SpeechClient.Create();
var config = new RecognitionConfig
{
AudioChannelCount = 2,
Encoding = RecognitionConfig.Types.AudioEncoding.Flac,
SampleRateHertz = 44100,
LanguageCode = LanguageCodes.English.UnitedStates
};
var audio = RecognitionAudio.FromFile(filepath);
var response = speech.Recognize(config, audio);
foreach (var result in response.Results)
{
foreach (var alternatives in result.Alternatives)
{
ContextList context = new ContextList();
Console.WritLine(alternatives.Transcript);
}
}