//
//  PQEditProduceVoiceConfigModel.swift
//  PQSpeed
//
//  Created by ak on 2020/12/5.
//  Copyright © 2020 BytesFlow. All rights reserved.
//

import Foundation
import ObjectMapper
import RealmSwift
import UIKit

public class PQEditProduceVoiceConfigModel: PQEditBaseModel {
    //阿里云参数
    @objc dynamic public var channel: String = ""
    @objc dynamic public var voice: String = ""
    @objc dynamic public var volume: Int = 100
    @objc dynamic public var speechRate: Int = 0
    @objc dynamic public var pitchRate: Int = 0
    
    //深音科技
    @objc dynamic public var deepsoundVolume: String = "" // deepsound音量（取值范围0.0-1.0，默认1.0表示最大音量）
    @objc dynamic public var deepsoundSpeechRate: String = ""
    @objc dynamic public var deepsoundPitchRate: String = ""
    
    //微软语音参数
    // 音量，以从 0.0 到 150.0（从最安静到最大声）， 默认值为 100.0。
    @objc dynamic public var azureVolume:String = "100"
    // 语速，取值为0.00-3.00，默认为1.00，如果值为 1，则速率不会变化。 如果值为 0.5，则速率会减慢一半。 如果值为 3，则速率为三倍。
    @objc dynamic public var azureSpeechRate:String = "1.00"
    // 语调，取值为-50%-50%，默认为0%
    @objc dynamic public var azurePitchRate:String = "0%"
    // 语音风格，默认为 general
    @objc dynamic public var azureStyle:String = "general"
    // 句末停顿时间，默认500ms
    @objc dynamic public var azureEndBreakTime:String = "0ms"
    

    required convenience public init?(map _: Map) {
        self.init()
    }

    public  override func mapping(map: Map) {
        channel <- map["channel"]
        voice <- map["voice"]
        volume <- map["volume"]
        speechRate <- map["speechRate"]
        pitchRate <- map["pitchRate"]
        
        deepsoundVolume <- map["deepsoundVolume"]
        deepsoundSpeechRate <- map["deepsoundSpeechRate"]
        deepsoundPitchRate <- map["deepsoundPitchRate"]
        
        azureVolume <- map["azureVolume"]
        azureSpeechRate <- map["azureSpeechRate"]
        azurePitchRate <- map["azurePitchRate"]
        azureStyle <- map["azureStyle"]
        azureEndBreakTime <- map["azureEndBreakTime"]
        
        
    }
}
