package cn.i2edu.speech_plugin.audioUtils.audioEvaluator.resultParse.util;

import android.util.SparseArray;

import java.util.HashMap;

/**
 * <p>Title: ResultTranslateUtl</p>
 * <p>Description: </p>
 * <p>Company: www.iflytek.com</p>
 * @author iflytek
 */
public class ResultTranslateUtil {
	
	private static final SparseArray<String> dp_message_map = new SparseArray<>();
	private static final HashMap<String, String> special_content_map = new HashMap<>();
	
	static {
		dp_message_map.put(0, "正常");
		dp_message_map.put(16, "漏读");
		dp_message_map.put(32, "增读");
		dp_message_map.put(64, "回读");
		dp_message_map.put(128, "替换");
		
		special_content_map.put("sil", "静音");
		special_content_map.put("silv", "静音");
		special_content_map.put("fil", "噪音");
	}
	
	public static String getDpMessageInfo(int dp_message) {
		return dp_message_map.get(dp_message);
	}
	
	public static String getContent(String content) {
		String val = special_content_map.get(content);
		return (null == val)? content: val;
	}
}
