Forráskód Böngészése

添加评测方法指定评测类型

hwh97 6 éve
szülő
commit
9d8b996457
2 módosított fájl, 15 hozzáadás és 51 törlés
  1. 11 47
      .idea/workspace.xml
  2. 4 4
      lib/speech_plugin.dart

+ 11 - 47
.idea/workspace.xml

@@ -2,17 +2,8 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="91fb8cbe-3946-4eca-a4cf-05dab52b73c6" name="Default Changelist" comment="">
-      <change beforePath="$PROJECT_DIR$/.idea/libraries/Dart_SDK.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/libraries/Dart_SDK.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/.idea/libraries/Flutter_Plugins.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/libraries/Flutter_Plugins.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/.idea/caches/build_file_checksums.ser" beforeDir="false" afterPath="$PROJECT_DIR$/android/.idea/caches/build_file_checksums.ser" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/speech_plugin/SpeechPlugin.kt" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/speech_plugin/SpeechPlugin.kt" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/speech_plugin/audioUtils/audioEvaluator/resultParse/FinalResult.java" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/speech_plugin/audioUtils/audioEvaluator/resultParse/FinalResult.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/speech_plugin/audioUtils/audioEvaluator/resultParse/Result.java" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/speech_plugin/audioUtils/audioEvaluator/resultParse/Result.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/speech_plugin/audioUtils/audioEvaluator/resultParse/XmlResultParser.java" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/speech_plugin/audioUtils/audioEvaluator/resultParse/XmlResultParser.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/speech_plugin/util/AudioEvaluatorUtil.kt" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/speech_plugin/util/AudioEvaluatorUtil.kt" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/lib/speech_plugin.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/speech_plugin.dart" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/speech_plugin.iml" beforeDir="false" afterPath="$PROJECT_DIR$/speech_plugin.iml" afterDir="false" />
     </list>
     <ignored path="$PROJECT_DIR$/.dart_tool/" />
     <ignored path="$PROJECT_DIR$/.idea/" />
@@ -36,8 +27,8 @@
       <file pinned="false" current-in-tab="true">
         <entry file="file://$PROJECT_DIR$/lib/speech_plugin.dart">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="352">
-              <caret line="18" column="19" lean-forward="true" selection-start-line="18" selection-start-column="19" selection-end-line="18" selection-end-column="19" />
+            <state relative-caret-position="176">
+              <caret line="31" column="49" lean-forward="true" selection-start-line="31" selection-start-column="49" selection-end-line="31" selection-end-column="49" />
             </state>
           </provider>
         </entry>
@@ -69,8 +60,10 @@
     </option>
   </component>
   <component name="ProjectFrameBounds" extendedState="6">
-    <option name="width" value="1440" />
-    <option name="height" value="900" />
+    <option name="x" value="522" />
+    <option name="y" value="28" />
+    <option name="width" value="1346" />
+    <option name="height" value="955" />
   </component>
   <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
   <component name="ProjectView">
@@ -78,6 +71,7 @@
       <foldersAlwaysOnTop value="true" />
     </navigator>
     <panes>
+      <pane id="PackagesPane" />
       <pane id="Scope" />
       <pane id="ProjectPane">
         <subPane>
@@ -86,35 +80,6 @@
               <item name="speech_plugin" type="b2602c69:ProjectViewProjectNode" />
               <item name="speech_plugin" type="462c0819:PsiDirectoryNode" />
             </path>
-            <path>
-              <item name="speech_plugin" type="b2602c69:ProjectViewProjectNode" />
-              <item name="speech_plugin" type="462c0819:PsiDirectoryNode" />
-              <item name="android" type="462c0819:PsiDirectoryNode" />
-            </path>
-            <path>
-              <item name="speech_plugin" type="b2602c69:ProjectViewProjectNode" />
-              <item name="speech_plugin" type="462c0819:PsiDirectoryNode" />
-              <item name="android" type="462c0819:PsiDirectoryNode" />
-              <item name="build" type="462c0819:PsiDirectoryNode" />
-            </path>
-            <path>
-              <item name="speech_plugin" type="b2602c69:ProjectViewProjectNode" />
-              <item name="speech_plugin" type="462c0819:PsiDirectoryNode" />
-              <item name="android" type="462c0819:PsiDirectoryNode" />
-              <item name="wrapper" type="462c0819:PsiDirectoryNode" />
-            </path>
-            <path>
-              <item name="speech_plugin" type="b2602c69:ProjectViewProjectNode" />
-              <item name="speech_plugin" type="462c0819:PsiDirectoryNode" />
-              <item name="android" type="462c0819:PsiDirectoryNode" />
-              <item name="libs" type="462c0819:PsiDirectoryNode" />
-            </path>
-            <path>
-              <item name="speech_plugin" type="b2602c69:ProjectViewProjectNode" />
-              <item name="speech_plugin" type="462c0819:PsiDirectoryNode" />
-              <item name="android" type="462c0819:PsiDirectoryNode" />
-              <item name="main" type="462c0819:PsiDirectoryNode" />
-            </path>
             <path>
               <item name="speech_plugin" type="b2602c69:ProjectViewProjectNode" />
               <item name="speech_plugin" type="462c0819:PsiDirectoryNode" />
@@ -128,7 +93,6 @@
           <select />
         </subPane>
       </pane>
-      <pane id="PackagesPane" />
       <pane id="AndroidView" />
     </panes>
   </component>
@@ -168,7 +132,7 @@
     <frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
     <editor active="true" />
     <layout>
-      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.14658849" />
+      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.14658849" />
       <window_info id="Captures" order="1" side_tool="true" />
       <window_info id="Structure" order="2" side_tool="true" />
       <window_info id="Image Layers" order="3" />
@@ -183,7 +147,7 @@
       <window_info anchor="bottom" id="Android Profiler" order="3" show_stripe_button="false" />
       <window_info anchor="bottom" id="Logcat" order="4" />
       <window_info anchor="bottom" id="Debug" order="5" />
-      <window_info active="true" anchor="bottom" id="Terminal" order="6" visible="true" weight="0.329718" />
+      <window_info anchor="bottom" id="Terminal" order="6" visible="true" weight="0.329718" />
       <window_info anchor="bottom" id="Event Log" order="7" side_tool="true" />
       <window_info anchor="bottom" id="Flutter Performance" order="8" side_tool="true" />
       <window_info anchor="bottom" id="Version Control" order="9" />
@@ -220,8 +184,8 @@
     </entry>
     <entry file="file://$PROJECT_DIR$/lib/speech_plugin.dart">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="352">
-          <caret line="18" column="19" lean-forward="true" selection-start-line="18" selection-start-column="19" selection-end-line="18" selection-end-column="19" />
+        <state relative-caret-position="176">
+          <caret line="31" column="49" lean-forward="true" selection-start-line="31" selection-start-column="49" selection-end-line="31" selection-end-column="49" />
         </state>
       </provider>
     </entry>

+ 4 - 4
lib/speech_plugin.dart

@@ -27,25 +27,25 @@ class SpeechPlugin {
     SpeechPlugin.evaluatorType = type; // 1为开启全维度,0为关闭
   }
 
- Future<Map> evaluatorByAudio(String pathEvaluatorDecode, int index, String videoId, String recordPath, String en) {
+ Future<Map> evaluatorByAudio(String pathEvaluatorDecode, int index, String videoId, String recordPath, String en, {int evaluatorType}) {
     return _channel.invokeMethod("evaluatorByAudio", {
       "pathEvaluatorDecode": pathEvaluatorDecode,
       "index": index,
       "videoId": videoId,
       "recordPath": recordPath,
       "en": en,
-      "evaluatorType": evaluatorType,
+      "evaluatorType": evaluatorType ?? SpeechPlugin.evaluatorType,
     });
  }
 
- Future<Map> evaluatorByMp4(String pathEvaluatorDecode, int index, String videoId, String recordPath, String en) {
+ Future<Map> evaluatorByMp4(String pathEvaluatorDecode, int index, String videoId, String recordPath, String en, {int evaluatorType}) {
    return _channel.invokeMethod("evaluatorByMp4", {
      "pathEvaluatorDecode": pathEvaluatorDecode,
      "index": index,
      "videoId": videoId,
      "recordPath": recordPath,
      "en": en,
-     "evaluatorType": evaluatorType,
+     "evaluatorType": evaluatorType ?? SpeechPlugin.evaluatorType,
    });
  }