Skip to content

Commit d2f6252

Browse files
authored
[VideoTranslation][csharp]Support lip sync and translate audio file. (#2855)
* Support lip sync and translate audio file. * Remove old comment.
1 parent ebbfa82 commit d2f6252

File tree

2 files changed

+8
-1
lines changed
  • samples/video-translation/csharp

2 files changed

+8
-1
lines changed

samples/video-translation/csharp/VideoTranslationLib.Public/VideoTranslationLib.Public/DataContracts/DTOs/Public-2025-05-20/TranslationInput.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ namespace Microsoft.SpeechServices.Cris.Http.DTOs.Public.VideoTranslation.Public
77

88
using System;
99
using System.Globalization;
10-
using System.Linq;
1110

1211
public partial class TranslationInput
1312
{
@@ -24,4 +23,8 @@ public partial class TranslationInput
2423
public bool? ExportSubtitleInVideo { get; set; }
2524

2625
public Uri VideoFileUrl { get; set; }
26+
27+
public Uri AudioFileUrl { get; set; }
28+
29+
public bool? EnableLipSync { get; set; }
2730
}

samples/video-translation/csharp/VideoTranslationSample/Program.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ static async Task<int> DoRunAndReturnExitCodeAsync(BaseOptions baseOptions)
9595
SubtitleMaxCharCountPerSegment = options.SubtitleMaxCharCountPerSegment,
9696
ExportSubtitleInVideo = options.ExportSubtitleInVideo,
9797
VideoFileUrl = options.VideoFileAzureBlobUrl,
98+
AudioFileUrl = options.AudioFileAzureBlobUrl,
99+
EnableLipSync = options.EnableLipSync ? true : null,
98100
},
99101
};
100102

@@ -242,6 +244,8 @@ static async Task<int> DoRunAndReturnExitCodeAsync(BaseOptions baseOptions)
242244
SubtitleMaxCharCountPerSegment = iteration.Input?.SubtitleMaxCharCountPerSegment,
243245
ExportSubtitleInVideo = iteration.Input?.ExportSubtitleInVideo,
244246
VideoFileUrl = options.VideoFileAzureBlobUrl,
247+
AudioFileUrl = options.AudioFileAzureBlobUrl,
248+
EnableLipSync = options.EnableLipSync ? true : null,
245249
}
246250
};
247251

0 commit comments

Comments
 (0)