Exemple #1
0
 private void Upload(string uploadFolder, string outputAzureUri)
 {
     foreach (string localFilePath in Directory.EnumerateFiles(uploadFolder))
     {
         string fileName       = localFilePath.Split('\\').Last();
         string uploadFileName = AzureUtils.PathCombine(outputAzureUri, fileName);
         AzureUtils.Upload(localFilePath, uploadFileName);
     }
 }
Exemple #2
0
        private static MappingLine MappingTransfer(string localRootPath, string azureRootPath, MappingLine line)
        {
            string localFolderPath = Directory.EnumerateDirectories(localRootPath, $"{line.TaskId}*").Single();
            string filePath        = Path.Combine(localFolderPath, "Speaker", line.TaskInternalName.Replace("ü", "u_"));

            if (File.Exists(filePath))
            {
                line.LocalPath = filePath;
            }
            string azureName = AzureUtils.PathCombine(azureRootPath, line.Dialect, localFolderPath.Split('\\').Last().Replace($"{line.TaskId}_", "").Replace("uu", "u"), line.TaskInternalName.Replace(' ', '+').Replace(".txt", ".wav"));

            if (AzureUtils.BlobExists(azureName))
            {
                line.AzureName = AzureUtils.GetShort(azureName);
            }
            else
            {
                ;
            }
            return(line);
        }