From 43567346b0fd36f609a1f377bfcea05183c6db0b Mon Sep 17 00:00:00 2001 From: Kazuki Kyakuno Date: Thu, 1 Feb 2024 10:20:15 +0900 Subject: [PATCH] Fix typo --- supplemental/speech/cpp/en/api.html | 36 +- supplemental/speech/cpp/jp/api.html | 36 +- .../unity/en/classAiliaSpeechModel.html | 428 +++++++++--------- .../unity/jp/classAiliaSpeechModel.html | 428 +++++++++--------- 4 files changed, 464 insertions(+), 464 deletions(-) diff --git a/supplemental/speech/cpp/en/api.html b/supplemental/speech/cpp/en/api.html index 12293cd3..b5cd71f0 100644 --- a/supplemental/speech/cpp/en/api.html +++ b/supplemental/speech/cpp/en/api.html @@ -166,13 +166,13 @@

flowchart A(Microphone or File)-->B -B[ailiaPushInpuData API]-->C -C[ailiaBuffered API]-->D +B[ailiaSpeechPushInputData API]-->C +C[ailiaSpeechBuffered API]-->D C-->B -D[ailiaTranscribe API]-->E -E[ailiaGetTextCount API]-->F -F[ailiaGetText API]-->K -K[ailiaCompplete API] --> B +D[ailiaSpeechTranscribe API]-->E +E[ailiaSpeechGetTextCount API]-->F +F[ailiaSpeechGetText API]-->K +K[ailiaSpeechComplete API] --> B

@@ -181,17 +181,17 @@

flowchart A(Microphone or File)-->B -B[ailiaPushInpuData API]-->C -C[ailiaBuffered API]-->D +B[ailiaSpeechPushInputData API]-->C +C[ailiaSpeechBuffered API]-->D C-->B -D[ailiaTranscribe API]-->E -E[ailiaGetTextCount API]-->F -F[ailiaGetText API]-->K +D[ailiaSpeechTranscribe API]-->E +E[ailiaSpeechGetTextCount API]-->F +F[ailiaSpeechGetText API]-->K F-->G -G[ailiaPostProcess API]-->H -H[ailiaGetTextCount API]-->I -I[ailiaGetText API]-->K -K[ailiaCompplete API] --> B +G[ailiaSpeechPostProcess API]-->H +H[ailiaSpeechGetTextCount API]-->I +I[ailiaSpeechGetText API]-->K +K[ailiaSpeechComplete API] --> B

@@ -199,9 +199,9 @@

flowchart -F[ailiaSetText API]-->G -G[ailiaPostProcess API]-->I -I[ailiaGetText API] +F[ailiaSpeechSetText API]-->G +G[ailiaSpeechPostProcess API]-->I +I[ailiaSpeechGetText API]

diff --git a/supplemental/speech/cpp/jp/api.html b/supplemental/speech/cpp/jp/api.html index 29267d28..eacf30e7 100644 --- a/supplemental/speech/cpp/jp/api.html +++ b/supplemental/speech/cpp/jp/api.html @@ -166,13 +166,13 @@

flowchart A(Microphone or File)-->B -B[ailiaPushInpuData API]-->C -C[ailiaBuffered API]-->D +B[ailiaSpeechPushInputData API]-->C +C[ailiaSpeechBuffered API]-->D C-->B -D[ailiaTranscribe API]-->E -E[ailiaGetTextCount API]-->F -F[ailiaGetText API]-->K -K[ailiaCompplete API] --> B +D[ailiaSpeechTranscribe API]-->E +E[ailiaSpeechGetTextCount API]-->F +F[ailiaSpeechGetText API]-->K +K[ailiaSpeechComplete API] --> B

@@ -181,17 +181,17 @@

flowchart A(Microphone or File)-->B -B[ailiaPushInpuData API]-->C -C[ailiaBuffered API]-->D +B[ailiaSpeechPushInputData API]-->C +C[ailiaSpeechBuffered API]-->D C-->B -D[ailiaTranscribe API]-->E -E[ailiaGetTextCount API]-->F -F[ailiaGetText API]-->K +D[ailiaSpeechTranscribe API]-->E +E[ailiaSpeechGetTextCount API]-->F +F[ailiaSpeechGetText API]-->K F-->G -G[ailiaPostProcess API]-->H -H[ailiaGetTextCount API]-->I -I[ailiaGetText API]-->K -K[ailiaCompplete API] --> B +G[ailiaSpeechPostProcess API]-->H +H[ailiaSpeechGetTextCount API]-->I +I[ailiaSpeechGetText API]-->K +K[ailiaSpeechComplete API] --> B

@@ -199,9 +199,9 @@

flowchart -F[ailiaSetText API]-->G -G[ailiaPostProcess API]-->I -I[ailiaGetText API] +F[ailiaSpeechSetText API]-->G +G[ailiaSpeechPostProcess API]-->I +I[ailiaSpeechGetText API]

diff --git a/supplemental/speech/unity/en/classAiliaSpeechModel.html b/supplemental/speech/unity/en/classAiliaSpeechModel.html index 90c2099f..1f133001 100644 --- a/supplemental/speech/unity/en/classAiliaSpeechModel.html +++ b/supplemental/speech/unity/en/classAiliaSpeechModel.html @@ -180,14 +180,14 @@

271  {
-
272  DestroyThread();
-
273  DestroyInterrupt();
-
274  if (net != IntPtr.Zero){
- -
276  net = IntPtr.Zero;
-
277  }
-
278  }
+
274  {
+
275  DestroyThread();
+
276  DestroyInterrupt();
+
277  if (net != IntPtr.Zero){
+ +
279  net = IntPtr.Zero;
+
280  }
+
281  }
@@ -215,9 +215,9 @@

Release resources.

-
288  {
-
289  Dispose(true);
-
290  }
+
291  {
+
292  Dispose(true);
+
293  }
@@ -244,12 +244,12 @@

-
293  {
-
294  if (disposing){
-
295  // release managed resource
-
296  }
-
297  Close(); // release unmanaged resource
-
298  }
+
296  {
+
297  if (disposing){
+
298  // release managed resource
+
299  }
+
300  Close(); // release unmanaged resource
+
301  }
@@ -278,9 +278,9 @@

Returns
The error detail string.
-
68  {
-
69  return m_error_detail;
-
70  }
+
71  {
+
72  return m_error_detail;
+
73  }
@@ -309,11 +309,11 @@

Returns
Transcribe results.
-
741  {
-
742  lock (m_intermediate_lock_async){
-
743  return m_intermediate_text;
-
744  }
-
745  }
+
744  {
+
745  lock (m_intermediate_lock_async){
+
746  return m_intermediate_text;
+
747  }
+
748  }
@@ -342,14 +342,14 @@

Returns
Transcribe results.
-
721  {
-
722  lock (m_lock_async)
-
723  {
-
724  List<string> results = new List<string>(m_results);
-
725  m_results.Clear();
-
726  return results;
-
727  }
-
728  }
+
724  {
+
725  lock (m_lock_async)
+
726  {
+
727  List<string> results = new List<string>(m_results);
+
728  m_results.Clear();
+
729  return results;
+
730  }
+
731  }
@@ -386,19 +386,19 @@

-
427  {
-
428  lock (m_intermediate_lock_async){
-
429  try{
-
430  string decoded_text = Marshal.PtrToStringAnsi(text);
-
431  m_intermediate_text = decoded_text;
-
432  }catch(Exception e){
-
433  }
-
434  }
-
435  if (Marshal.ReadInt32(handle) != 0){
-
436  return -1; // 中断
+
430  {
+
431  lock (m_intermediate_lock_async){
+
432  try{
+
433  string decoded_text = Marshal.PtrToStringAnsi(text);
+
434  m_intermediate_text = decoded_text;
+
435  }catch(Exception e){
+
436  }
437  }
-
438  return 0;
-
439  }
+
438  if (Marshal.ReadInt32(handle) != 0){
+
439  return -1; // 中断
+
440  }
+
441  return 0;
+
442  }
@@ -427,12 +427,12 @@

Returns
If Speech2Text is complete, it returns true , or false otherwise.
-
703  {
-
704  lock (m_lock_async)
-
705  {
-
706  return m_complete;
-
707  }
-
708  }
+
706  {
+
707  lock (m_lock_async)
+
708  {
+
709  return m_complete;
+
710  }
+
711  }
@@ -461,9 +461,9 @@

Returns
If error is occured, it returns true , or false otherwise.
-
53  {
-
54  return m_error;
-
55  }
+
56  {
+
57  return m_error;
+
58  }
@@ -492,12 +492,12 @@

Returns
If sub thread is processing, it returns true , or false otherwise.
-
667  {
-
668  lock (m_lock_async)
-
669  {
-
670  return m_processing;
-
671  }
-
672  }
+
670  {
+
671  lock (m_lock_async)
+
672  {
+
673  return m_processing;
+
674  }
+
675  }
@@ -526,12 +526,12 @@

Returns
If Speech2Text is running, it returns true , or false otherwise.
-
685  {
-
686  lock (m_lock_async)
-
687  {
-
688  return m_decoding;
-
689  }
-
690  }
+
688  {
+
689  lock (m_lock_async)
+
690  {
+
691  return m_decoding;
+
692  }
+
693  }
@@ -613,61 +613,61 @@

Returns
If this function is successful, it returns true , or false otherwise.
-
101  {
-
102  if (net != null){
-
103  Close();
-
104  }
-
105 
- -
107 
-
108  int memory_mode = Ailia.AILIA_MEMORY_REDUCE_CONSTANT | Ailia.AILIA_MEMORY_REDUCE_CONSTANT_WITH_INPUT_INITIALIZER | Ailia.AILIA_MEMORY_REUSE_INTERSTAGE;
-
109  int status = AiliaSpeech.ailiaSpeechCreate(ref net, env_id, Ailia.AILIA_MULTITHREAD_AUTO, memory_mode, task, flag, callback, AiliaSpeech.AILIA_SPEECH_API_CALLBACK_VERSION);
-
110  Check(status, "ailiaSpeechCreate");
-
111  if (status != 0){
-
112  return false;
-
113  }
-
114 
-
115  status = AiliaSpeech.ailiaSpeechOpenModelFile(net, encoder_path, decoder_path, model_type);
-
116  Check(status, "ailiaSpeechOpenModelFile");
-
117  if (status != 0){
-
118  return false;
-
119  }
-
120 
-
121  if (language != "auto"){
-
122  status = AiliaSpeech.ailiaSpeechSetLanguage(net, language);
-
123  Check(status, "ailiaSpeechSetLanguage");
-
124  if (status != 0){
-
125  return false;
-
126  }
-
127  }
-
128 
-
129  status = AiliaSpeech.ailiaSpeechSetSilentThreshold(net, THRESHOLD_VOLUME, SPEECH_SEC, NO_SPEECH_SEC);
-
130  Check(status, "ailiaSpeechSetSilentThreshold");
-
131  if (status != 0){
-
132  return false;
-
133  }
-
134 
-
135  CreateInterrupt();
-
136 
- -
138  Check(status, "ailiaSpeechSetIntermediateCallback");
-
139  if (status != 0){
-
140  return false;
-
141  }
-
142 
-
143  CreateThread();
-
144 
-
145  m_error = false;
-
146  m_error_detail = "";
+
104  {
+
105  if (net != null){
+
106  Close();
+
107  }
+
108 
+ +
110 
+
111  int memory_mode = Ailia.AILIA_MEMORY_REDUCE_CONSTANT | Ailia.AILIA_MEMORY_REDUCE_CONSTANT_WITH_INPUT_INITIALIZER | Ailia.AILIA_MEMORY_REUSE_INTERSTAGE;
+
112  int status = AiliaSpeech.ailiaSpeechCreate(ref net, env_id, Ailia.AILIA_MULTITHREAD_AUTO, memory_mode, task, flag, callback, AiliaSpeech.AILIA_SPEECH_API_CALLBACK_VERSION);
+
113  Check(status, "ailiaSpeechCreate");
+
114  if (status != 0){
+
115  return false;
+
116  }
+
117 
+
118  status = AiliaSpeech.ailiaSpeechOpenModelFile(net, encoder_path, decoder_path, model_type);
+
119  Check(status, "ailiaSpeechOpenModelFile");
+
120  if (status != 0){
+
121  return false;
+
122  }
+
123 
+
124  if (language != "auto"){
+
125  status = AiliaSpeech.ailiaSpeechSetLanguage(net, language);
+
126  Check(status, "ailiaSpeechSetLanguage");
+
127  if (status != 0){
+
128  return false;
+
129  }
+
130  }
+
131 
+
132  status = AiliaSpeech.ailiaSpeechSetSilentThreshold(net, THRESHOLD_VOLUME, SPEECH_SEC, NO_SPEECH_SEC);
+
133  Check(status, "ailiaSpeechSetSilentThreshold");
+
134  if (status != 0){
+
135  return false;
+
136  }
+
137 
+
138  CreateInterrupt();
+
139 
+ +
141  Check(status, "ailiaSpeechSetIntermediateCallback");
+
142  if (status != 0){
+
143  return false;
+
144  }
+
145 
+
146  CreateThread();
147 
-
148  if ((flag & AiliaSpeech.AILIA_SPEECH_FLAG_LIVE) != 0){
-
149  live_mode = true;
-
150  }else{
-
151  live_mode = false;
-
152  }
-
153 
-
154  return true;
-
155  }
+
148  m_error = false;
+
149  m_error_detail = "";
+
150 
+
151  if ((flag & AiliaSpeech.AILIA_SPEECH_FLAG_LIVE) != 0){
+
152  live_mode = true;
+
153  }else{
+
154  live_mode = false;
+
155  }
+
156 
+
157  return true;
+
158  }
@@ -714,17 +714,17 @@

Returns
If this function is successful, it returns true , or false otherwise.
-
204  {
-
205  if (net == null){
-
206  return false;
-
207  }
-
208  int status = AiliaSpeech.ailiaSpeechOpenDictionaryFile(net, dictionary_path, dictionary_type);
-
209  Check(status, "ailiaSpeechOpenDictionaryFile");
-
210  if (status != 0){
-
211  return false;
-
212  }
-
213  return true;
-
214  }
+
207  {
+
208  if (net == null){
+
209  return false;
+
210  }
+
211  int status = AiliaSpeech.ailiaSpeechOpenDictionaryFile(net, dictionary_path, dictionary_type);
+
212  Check(status, "ailiaSpeechOpenDictionaryFile");
+
213  if (status != 0){
+
214  return false;
+
215  }
+
216  return true;
+
217  }
@@ -799,22 +799,22 @@

Returns
If this function is successful, it returns true , or false otherwise.
-
239  {
-
240  if (net == null){
-
241  return false;
-
242  }
-
243  byte[] text = System.Text.Encoding.UTF8.GetBytes(prefix+"\u0000");
-
244  GCHandle handle = GCHandle.Alloc(text, GCHandleType.Pinned);
-
245  IntPtr prefix_ptr = handle.AddrOfPinnedObject();
-
246  int status = AiliaSpeech.ailiaSpeechOpenPostProcessFile(net, encoder_path, decoder_path, source_path, target_path, prefix_ptr, type);
-
247  handle.Free();
-
248  Check(status, "ailiaSpeechOpenPostProcessFile");
-
249  if (status != 0){
-
250  return false;
-
251  }
-
252  post_process_mode = true;
-
253  return true;
-
254  }
+
242  {
+
243  if (net == null){
+
244  return false;
+
245  }
+
246  byte[] text = System.Text.Encoding.UTF8.GetBytes(prefix+"\u0000");
+
247  GCHandle handle = GCHandle.Alloc(text, GCHandleType.Pinned);
+
248  IntPtr prefix_ptr = handle.AddrOfPinnedObject();
+
249  int status = AiliaSpeech.ailiaSpeechOpenPostProcessFile(net, encoder_path, decoder_path, source_path, target_path, prefix_ptr, type);
+
250  handle.Free();
+
251  Check(status, "ailiaSpeechOpenPostProcessFile");
+
252  if (status != 0){
+
253  return false;
+
254  }
+
255  post_process_mode = true;
+
256  return true;
+
257  }
@@ -861,22 +861,22 @@

Returns
If this function is successful, it returns true , or false otherwise.
-
172  {
-
173  if (net == null){
-
174  return false;
-
175  }
-
176  int status = AiliaSpeech.ailiaSpeechOpenVadFile(net, vad_path, vad_type);
-
177  Check(status, "ailiaSpeechOpenVadFile");
-
178  if (status != 0){
-
179  return false;
-
180  }
-
181  status = AiliaSpeech.ailiaSpeechSetSilentThreshold(net, THRESHOLD_VAD, SPEECH_SEC, NO_SPEECH_SEC);
-
182  Check(status, "ailiaSpeechSetSilentThreshold");
-
183  if (status != 0){
-
184  return false;
-
185  }
-
186  return true;
-
187  }
+
175  {
+
176  if (net == null){
+
177  return false;
+
178  }
+
179  int status = AiliaSpeech.ailiaSpeechOpenVadFile(net, vad_path, vad_type);
+
180  Check(status, "ailiaSpeechOpenVadFile");
+
181  if (status != 0){
+
182  return false;
+
183  }
+
184  status = AiliaSpeech.ailiaSpeechSetSilentThreshold(net, THRESHOLD_VAD, SPEECH_SEC, NO_SPEECH_SEC);
+
185  Check(status, "ailiaSpeechSetSilentThreshold");
+
186  if (status != 0){
+
187  return false;
+
188  }
+
189  return true;
+
190  }
@@ -905,17 +905,17 @@

Returns
If this function is successful, it returns true , or false otherwise.
-
758  {
- -
760  lock (m_lock_async)
-
761  {
-
762  m_complete = false;
-
763  }
-
764  if (status == 0){
-
765  return true;
+
761  {
+ +
763  lock (m_lock_async)
+
764  {
+
765  m_complete = false;
766  }
-
767  return false;
-
768  }
+
767  if (status == 0){
+
768  return true;
+
769  }
+
770  return false;
+
771  }
@@ -962,17 +962,17 @@

Returns
If this function is successful, it returns true , or false otherwise.
-
354  {
-
355  byte[] text = System.Text.Encoding.UTF8.GetBytes(constraint+"\u0000");
-
356  GCHandle handle = GCHandle.Alloc(text, GCHandleType.Pinned);
-
357  IntPtr input = handle.AddrOfPinnedObject();
-
358  int status = AiliaSpeech.ailiaSpeechSetConstraint(net, input, constraint_type);
-
359  handle.Free();
-
360  if (status != 0){
-
361  return false;
-
362  }
-
363  return true;
-
364  }
+
357  {
+
358  byte[] text = System.Text.Encoding.UTF8.GetBytes(constraint+"\u0000");
+
359  GCHandle handle = GCHandle.Alloc(text, GCHandleType.Pinned);
+
360  IntPtr input = handle.AddrOfPinnedObject();
+
361  int status = AiliaSpeech.ailiaSpeechSetConstraint(net, input, constraint_type);
+
362  handle.Free();
+
363  if (status != 0){
+
364  return false;
+
365  }
+
366  return true;
+
367  }
@@ -1008,17 +1008,17 @@

Returns
If this function is successful, it returns true , or false otherwise.
-
322  {
-
323  byte[] text = System.Text.Encoding.UTF8.GetBytes(prompt+"\u0000");
-
324  GCHandle handle = GCHandle.Alloc(text, GCHandleType.Pinned);
-
325  IntPtr input = handle.AddrOfPinnedObject();
-
326  int status = AiliaSpeech.ailiaSpeechSetPrompt(net, input);
-
327  handle.Free();
-
328  if (status != 0){
-
329  return false;
-
330  }
-
331  return true;
-
332  }
+
325  {
+
326  byte[] text = System.Text.Encoding.UTF8.GetBytes(prompt+"\u0000");
+
327  GCHandle handle = GCHandle.Alloc(text, GCHandleType.Pinned);
+
328  IntPtr input = handle.AddrOfPinnedObject();
+
329  int status = AiliaSpeech.ailiaSpeechSetPrompt(net, input);
+
330  handle.Free();
+
331  if (status != 0){
+
332  return false;
+
333  }
+
334  return true;
+
335  }
@@ -1079,21 +1079,21 @@

Returns
If this function is successful, it returns true , or false otherwise. @detail Run speech recognition. Non -blocked API. When the execution is completed, the IsTranscribed API returns True. Execution results can be obtained with the GetResults API. The result of execution can be obtained with the GetIntermediateText API. It is an error if the IsProcessing API is true.
-
640  {
-
641  if (IsProcessing()){
-
642  return false;
-
643  }
-
644  lock (m_lock_async)
-
645  {
-
646  threadChannels = channels;
-
647  threadFrequency = frequency;
-
648  threadWaveQueue = new List<float[]>(waveQueue);
-
649  threadComplete = tail;
-
650  m_processing = true;
-
651  m_auto_event.Set();
-
652  }
-
653  return true;
-
654  }
+
643  {
+
644  if (IsProcessing()){
+
645  return false;
+
646  }
+
647  lock (m_lock_async)
+
648  {
+
649  threadChannels = channels;
+
650  threadFrequency = frequency;
+
651  threadWaveQueue = new List<float[]>(waveQueue);
+
652  threadComplete = tail;
+
653  m_processing = true;
+
654  m_auto_event.Set();
+
655  }
+
656  return true;
+
657  }
@@ -1103,17 +1103,17 @@

static int ailiaSpeechOpenModelFile(IntPtr net, string encoder_path, string decoder_path, int model_type)
Set models into a network instance.
static int ailiaSpeechOpenVadFile(IntPtr net, string vad_path, int vad_type)
Set vad model for voice activity detection.
-
virtual void Dispose()
Release resources.
Definition: AiliaSpeechModel.cs:287
+
virtual void Dispose()
Release resources.
Definition: AiliaSpeechModel.cs:290
static int ailiaSpeechSetPrompt(IntPtr net, IntPtr prompt)
Set prompt.
static int ailiaSpeechSetIntermediateCallback(IntPtr net, ailiaIntermediateCallback callback, IntPtr handle)
Set a callback to get intermediate results of recognition.
static int ailiaSpeechSetLanguage(IntPtr net, string language)
Performs the inferences and provides the inference result.
Definition: AiliaSpeech.cs:495
static int ailiaSpeechSetSilentThreshold(IntPtr net, float silent_threshold, float speech_sec, float no_speech_sec)
Set silent threshold.
-
bool IsProcessing()
Check is processing sub thread.
Definition: AiliaSpeechModel.cs:667
+
bool IsProcessing()
Check is processing sub thread.
Definition: AiliaSpeechModel.cs:670
static int ailiaSpeechOpenDictionaryFile(IntPtr net, string dictionary_path, int dictionary_type)
Set dictionary for error correction.
const Int32 AILIA_SPEECH_FLAG_LIVE
Definition: AiliaSpeech.cs:170
static int ailiaSpeechOpenPostProcessFile(IntPtr net, string encoder_path, string decoder_path, string source_path, string target_path, IntPtr prefix, int post_process_type)
Set AI model for post process.
-
virtual void Close()
Destroys instance.
Definition: AiliaSpeechModel.cs:270
+
virtual void Close()
Destroys instance.
Definition: AiliaSpeechModel.cs:273
static AiliaSpeech.AILIASpeechApiCallback GetCallback()
Definition: AiliaSpeech.cs:531
const int AILIA_SPEECH_API_CALLBACK_VERSION
Definition: AiliaSpeech.cs:491
static int ailiaSpeechCreate(ref IntPtr net, int env_id, int num_thread, int memory_mode, int task, int flag, AILIASpeechApiCallback callback, int version)
Creates a network instance.
@@ -1121,7 +1121,7 @@

static int ailiaSpeechSetConstraint(IntPtr net, IntPtr constraint, int type)
Set constraint.
static int ailiaSpeechResetTranscribeState(IntPtr net)
It resets the network instance.
static void ailiaSpeechDestroy(IntPtr net)
It destroys the network instance.
-
static int IntermediateCallback(IntPtr handle, IntPtr text)
Definition: AiliaSpeechModel.cs:427
+
static int IntermediateCallback(IntPtr handle, IntPtr text)
Definition: AiliaSpeechModel.cs:430