42 lines
1.3 KiB
C#
42 lines
1.3 KiB
C#
namespace DramaLing.Api.Models.Dtos;
|
|
|
|
public class TTSRequest
|
|
{
|
|
public string Text { get; set; } = string.Empty;
|
|
public string Accent { get; set; } = "us"; // "us" or "uk"
|
|
public float Speed { get; set; } = 1.0f;
|
|
public string Voice { get; set; } = string.Empty;
|
|
}
|
|
|
|
public class TTSResponse
|
|
{
|
|
public string AudioUrl { get; set; } = string.Empty;
|
|
public float Duration { get; set; }
|
|
public bool CacheHit { get; set; }
|
|
public string Error { get; set; } = string.Empty;
|
|
}
|
|
|
|
public class PronunciationRequest
|
|
{
|
|
public string TargetText { get; set; } = string.Empty;
|
|
public string UserLevel { get; set; } = "B1"; // CEFR level
|
|
}
|
|
|
|
public class PronunciationResponse
|
|
{
|
|
public int OverallScore { get; set; }
|
|
public float Accuracy { get; set; }
|
|
public float Fluency { get; set; }
|
|
public float Completeness { get; set; }
|
|
public float Prosody { get; set; }
|
|
public List<PhonemeScore> PhonemeScores { get; set; } = new();
|
|
public List<string> Suggestions { get; set; } = new();
|
|
public string Error { get; set; } = string.Empty;
|
|
}
|
|
|
|
public class PhonemeScore
|
|
{
|
|
public string Phoneme { get; set; } = string.Empty;
|
|
public int Score { get; set; }
|
|
public string? Suggestion { get; set; }
|
|
} |