### Project Setup and Demo Execution (Shell) Source: https://github.com/tencentcloud/tencentcloud-speech-sdk-js/blob/main/asr/README.md Commands to clone the repository, install dependencies, and run the development server for the Tencent Cloud Speech SDK for JavaScript. This allows viewing local demos and obtaining real-time recognition results. ```shell git clone https://github.com/TencentCloud/tencentcloud-speech-sdk-js.git cd tencentcloud-speech-sdk-js npm install npm run dev ``` -------------------------------- ### Initialize Tencent Speech Evaluation SDK (SoeNewConnect) Source: https://github.com/tencentcloud/tencentcloud-speech-sdk-js/blob/main/soe/README.md Initializes the SoeNewConnect SDK for speech evaluation when custom audio processing is required. It allows for sending audio data directly after establishing a connection. The setup involves initializing a log server (optional), creating an instance of SoeNewConnect, and defining callbacks for evaluation events. The process includes starting, writing data, and stopping the evaluation. ```javascript const logServer = window.SoeNewLogReport(isLog); logServer.LogInit(); const evaluationManager = new window.SoeNewConnect(params, isLog, logServer); const params = { secretkey: '', secretid: '', appid: '', token: '' server_engine_type : '16k_zh', text_mode: '', ref_text: '', eval_mode: '', score_coeff: '', sentence_info_enabled: 1 }; if (// 可以开始评测了) { evaluationManager.write(data); } evaluationManager.OnEvaluationStart = (res) => { console.log('开始评测', res) } evaluationManager.OnEvaluationResultChange = (res) => { console.log('评测变化时', res) } evaluationManager.OnEvaluationComplete = (res) => { console.log('评测结束', res) } evaluationManager.OnError = (res) => { console.log('评测失败', res) } evaluationManager.start(params); if (连接已经建立...) { evaluationManager.stop(); } const logs = evaluationManager.OndownloadLogs(); ``` -------------------------------- ### Initialize Tencent Speech Evaluation SDK (SowNewSocketSdk) Source: https://github.com/tencentcloud/tencentcloud-speech-sdk-js/blob/main/soe/README.md Initializes the SowNewSocketSdk for real-time speech evaluation via WebSocket. This involves creating an instance with parameters and setting up callback functions for various events like evaluation start, result changes, completion, and errors. It also includes methods to start and stop the evaluation process. ```javascript const soeEvaluationManager = new window.SowNewSocketSdk(params, isLog); soeEvaluationManager.OnRecognitionStart = (res) => { console.log('开始评测', res); } soeEvaluationManager.OnRecognitionResultChange = (res) => { console.log('评测变化时', res) } soeEvaluationManager.OnRecognitionComplete = (res) => { console.log('评测结束', res); } soeEvaluationManager.OnError = (res) => { console.log('评测失败', res); } soeEvaluationManager.OnRecorderStop = (res) => { console.log('录音结束', res); } const logs = soeEvaluationManager.OndownloadLogs(); const params = { secretkey: '', secretid: '', appid: '', token: '' server_engine_type : '16k_zh', text_mode: '', ref_text: '', eval_mode: '', score_coeff: '', sentence_info_enabled: 1 }; speechEvaluationManager.start(params); speechEvaluationManager.stop(); ``` -------------------------------- ### Initialize WebRecorder (JavaScript) Source: https://github.com/tencentcloud/tencentcloud-speech-sdk-js/blob/main/asr/README.md Instantiates the WebRecorder class for capturing audio data from the browser. This class provides start() and stop() methods, along with OnReceivedData() and OnError() events to handle audio data streams. It can capture audio at 16KHz. ```javascript const webRecorder = new WebRecorder(); ``` -------------------------------- ### Initialize WebAudioSpeechRecognizer (JavaScript) Source: https://github.com/tencentcloud/tencentcloud-speech-sdk-js/blob/main/asr/README.md Instantiates the WebAudioSpeechRecognizer class for simple speech recognition using the browser's built-in audio input. This class provides methods for starting and stopping recognition and handling results. ```javascript const webAudioSpeechRecognizer = new WebAudioSpeechRecognizer(); ``` -------------------------------- ### Integrated Real-time Speech Recognition with WebAudioSpeechRecognizer Source: https://context7.com/tencentcloud/tencentcloud-speech-sdk-js/llms.txt Demonstrates how to use the WebAudioSpeechRecognizer class to handle both microphone audio capture and real-time speech recognition. It includes configuration parameters, event callbacks for recognition stages, and methods to start or stop the process. ```javascript const params = { secretid: 'YOUR_SECRET_ID', secretkey: 'YOUR_SECRET_KEY', appid: 'YOUR_APP_ID', engine_model_type: '16k_zh' }; const webAudioSpeechRecognizer = new WebAudioSpeechRecognizer(params, true); webAudioSpeechRecognizer.OnRecognitionResultChange = (res) => { console.log('识别变化', res.result.voice_text_str); }; webAudioSpeechRecognizer.start(); ``` -------------------------------- ### Initialize SpeechRecognizer (JavaScript) Source: https://github.com/tencentcloud/tencentcloud-speech-sdk-js/blob/main/asr/README.md Instantiates the SpeechRecognizer class for advanced speech recognition, allowing custom data sources. This class offers start(), stop(), and write() methods, along with event handling for recognition results and optional local log printing. ```javascript const speechRecognizer = new SpeechRecognizer(); ``` -------------------------------- ### Authentication Signature Generation Source: https://context7.com/tencentcloud/tencentcloud-speech-sdk-js/llms.txt Functions and examples for generating authentication signatures required for accessing Tencent Cloud speech services. ```APIDOC ## Authentication Signature ### signCallback - Signature Generation Function ### Description The signature function is used to generate the authentication signature required for accessing Tencent Cloud speech services. The SDK provides a default signature implementation and also supports custom signature logic. It is recommended to perform the signature process on the server-side in a production environment to protect key security. ### Method `function signCallback(secretKey, signStr)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **secretKey** (string) - Required - Tencent Cloud SecretKey. - **signStr** (string) - Required - The string to be signed. ### Request Example ```javascript // Import CryptoJS library (built into SDK or needs separate import) // // Usage of custom signature callback const params = { secretid: 'YOUR_SECRET_ID', secretkey: 'YOUR_SECRET_KEY', appid: 'YOUR_APP_ID', engine_model_type: '16k_zh', // Custom signature callback (optional) signCallback: (signStr) => { // You can call a server-side interface here to get the signature // return fetchSignatureFromServer(signStr); // Or use the default signature method return signCallback('YOUR_SECRET_KEY', signStr); } }; // Server-side signature example (recommended) async function fetchSignatureFromServer(signStr) { const response = await fetch('/api/sign', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ signStr }) }); const data = await response.json(); return data.signature; } // Temporary key usage example const paramsWithTempKey = { secretid: 'TEMP_SECRET_ID', // tmpSecretId secretkey: 'TEMP_SECRET_KEY', // tmpSecretKey token: 'SESSION_TOKEN', // Temporary key Token appid: 'YOUR_APP_ID', engine_model_type: '16k_zh', }; ``` ### Response #### Success Response (200) - **return value** (string) - Base64 encoded signature. #### Response Example ```javascript // Example signature string // "aGVsbG8gd29ybGQ=" ``` ``` -------------------------------- ### Capture Browser Audio with WebRecorder Source: https://github.com/tencentcloud/tencentcloud-speech-sdk-js/blob/main/asr/README.md Demonstrates how to instantiate the WebRecorder class to capture audio data from the browser. It shows how to handle received data and errors, as well as how to control the recording state. ```javascript const recorder = new WebRecorder(); recorder.OnReceivedData = (res) => { console.log(res); }; recorder.OnError = (err) => { console.log(err); }; recorder.start(); recorder.stop(); ``` -------------------------------- ### Integrated Audio Recording and Recognition with WebAudioSpeechRecognizer Source: https://github.com/tencentcloud/tencentcloud-speech-sdk-js/blob/main/asr/README.md Shows how to use WebAudioSpeechRecognizer to simultaneously record audio and perform speech recognition. It includes lifecycle management and the destroyStream method for cleaning up resources. ```javascript const webAudioSpeechRecognizer = new WebAudioSpeechRecognizer(params, isLog); webAudioSpeechRecognizer.OnRecognitionStart = (res) => { console.log('开始识别', res); }; webAudioSpeechRecognizer.OnSentenceBegin = (res) => { console.log('一句话开始', res); }; webAudioSpeechRecognizer.OnRecognitionResultChange = (res) => { console.log('识别变化时', res); }; webAudioSpeechRecognizer.OnSentenceEnd = (res) => { console.log('一句话结束', res); }; webAudioSpeechRecognizer.OnRecognitionComplete = (res) => { console.log('识别结束', res); }; webAudioSpeechRecognizer.OnError = (res) => { console.log('识别失败', res); }; webAudioSpeechRecognizer.start(); webAudioSpeechRecognizer.stop(); webAudioSpeechRecognizer.destroyStream(); ``` -------------------------------- ### Perform Speech Recognition with SpeechRecognizer Source: https://github.com/tencentcloud/tencentcloud-speech-sdk-js/blob/main/asr/README.md Illustrates the usage of the SpeechRecognizer class to perform speech recognition. It covers the initialization process, event callbacks for recognition lifecycle stages, and methods for sending audio data. ```javascript const speechRecognizer = new SpeechRecognizer(params, requestId, isLog); speechRecognizer.OnRecognitionStart = (res) => { console.log('开始识别', res); }; speechRecognizer.OnSentenceBegin = (res) => { console.log('一句话开始', res); }; speechRecognizer.OnRecognitionResultChange = (res) => { console.log('识别变化时', res); }; speechRecognizer.OnSentenceEnd = (res) => { console.log('一句话结束', res); }; speechRecognizer.OnRecognitionComplete = (res) => { console.log('识别结束', res); }; speechRecognizer.OnError = (res) => { console.log('识别失败', res); }; speechRecognizer.start(); // speechRecognizer.write(data); speechRecognizer.stop(); ``` -------------------------------- ### SoeNewConnect - Manual Audio Stream Evaluation Source: https://github.com/tencentcloud/tencentcloud-speech-sdk-js/blob/main/soe/README.md The SoeNewConnect class allows developers to handle audio data manually and stream it to the Tencent Cloud evaluation service. ```APIDOC ## [POST] SoeNewConnect.write ### Description Sends raw audio data to the evaluation server after the connection is established via start(). ### Method POST ### Parameters #### Request Body - **data** (binary) - Required - Raw audio data chunks to be evaluated. ### Response #### Success Response (Callback) - **OnEvaluationResultChange** - Triggered when intermediate evaluation results are available for the streamed data. - **OnEvaluationComplete** - Triggered when the final evaluation result is returned. ``` -------------------------------- ### SoeNewConnect: Advanced Speech Evaluation Connector Source: https://context7.com/tencentcloud/tencentcloud-speech-sdk-js/llms.txt SoeNewConnect offers flexible speech evaluation interfaces, managing WebSocket communication with Tencent Cloud's service. Audio data must be sent manually, making it suitable for custom audio capture or preprocessing scenarios. ```javascript import LogReport from './lib/LogReport'; const isLog = true; const logServer = new LogReport(isLog); await logServer.LogInit(); const params = { secretid: 'YOUR_SECRET_ID', secretkey: 'YOUR_SECRET_KEY', appid: 'YOUR_APP_ID', voice_id: 'unique-voice-id-' + Date.now(), ref_text: 'Good morning', eval_mode: 1, server_engine_type: '16k_zh', sentence_info_enabled: 1, }; const soeConnect = new SoeNewConnect(params, isLog, logServer); let isConnected = false; soeConnect.OnEvaluationStart = (res) => { console.log('连接建立,可以发送数据', res); isConnected = true; }; soeConnect.OnEvaluationResultChange = (res) => { console.log('评测中间结果:', res); }; soeConnect.OnEvaluationComplete = (res) => { console.log('评测完成:', res); isConnected = false; if (res.result) { const result = res.result; console.log('建议分数:', result.SuggestedScore); console.log('单词详情:', result.Words); } }; soeConnect.OnError = (err) => { console.error('评测错误:', err); isConnected = false; }; soeConnect.start(); function sendAudioData(audioData) { if (isConnected) { soeConnect.write(audioData); } else { console.warn('连接未建立,请稍后发送数据'); } } // soeConnect.stop(); // soeConnect.close(); // const logs = await soeConnect.OndownloadLogs(); ``` -------------------------------- ### Advanced Speech Recognition with Custom Data using SpeechRecognizer Source: https://context7.com/tencentcloud/tencentcloud-speech-sdk-js/llms.txt Shows how to use the SpeechRecognizer class for scenarios where audio data is provided from external sources. It requires manual management of the WebSocket connection and the use of the write() method to stream PCM audio data. ```javascript const params = { secretid: 'YOUR_SECRET_ID', secretkey: 'YOUR_SECRET_KEY', appid: 'YOUR_APP_ID', engine_model_type: '16k_zh', voice_format: 1 }; const speechRecognizer = new SpeechRecognizer(params, 'request-id', true); let isConnected = false; speechRecognizer.OnRecognitionStart = () => { isConnected = true; }; speechRecognizer.start(); function sendAudioData(audioData) { if (isConnected) { speechRecognizer.write(audioData); } } ``` -------------------------------- ### WebAudioSpeechRecognizer API Source: https://github.com/tencentcloud/tencentcloud-speech-sdk-js/blob/main/asr/README.md An integrated class that combines browser audio recording and speech recognition streaming. ```APIDOC ## WebAudioSpeechRecognizer ### Description High-level class that handles both microphone recording and streaming to the speech recognition service. ### Methods - **start()**: Starts recording and connects to the service. - **stop()**: Stops recording. - **destroyStream()**: Explicitly closes the WebSocket connection. ### Example ```javascript const recognizer = new WebAudioSpeechRecognizer(params, true); recognizer.start(); // To close connection: recognizer.destroyStream(); ``` ``` -------------------------------- ### WebRecorder Audio Capture Source: https://github.com/tencentcloud/tencentcloud-speech-sdk-js/blob/main/asr/README.md The WebRecorder class is used to capture audio data from the browser microphone. ```APIDOC ## WebRecorder Audio Capture ### Description Captures raw audio data from the browser's microphone for processing. ### Methods - **start()**: Begins audio recording. - **stop()**: Stops audio recording. ### Callbacks - **OnReceivedData(res)**: Triggered when audio data is captured. - **OnError(err)**: Triggered when an error occurs during recording. ### Example ```javascript const recorder = new WebRecorder(); recorder.OnReceivedData = (res) => console.log(res); recorder.start(); ``` ``` -------------------------------- ### Audio Resampling and PCM Conversion Source: https://context7.com/tencentcloud/tencentcloud-speech-sdk-js/llms.txt Functions to resample audio data to 16kHz and convert it to 16-bit PCM format, required by Tencent Cloud speech services. ```APIDOC ## to16kHz - Audio Resampling Function ### Description The `to16kHz` function resamples audio data of any sample rate to 16kHz, which is the standard sample rate required by Tencent Cloud speech services. This function uses linear interpolation for resampling, ensuring audio quality while meeting server requirements. ### Method `function to16kHz(audioData, sampleRate = 44100)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **audioData** (Float32Array) - Required - Original audio data. - **sampleRate** (number) - Optional - Original sample rate, defaults to 44100Hz. ### Request Example ```javascript // Usage example: Processing audio data obtained from AudioContext const audioContext = new AudioContext(); // Default sample rate is usually 44100Hz or 48000Hz const scriptProcessor = audioContext.createScriptProcessor(1024, 1, 1); scriptProcessor.onaudioprocess = (e) => { const inputData = e.inputBuffer.getChannelData(0); // Float32Array const output16k = to16kHz(inputData, audioContext.sampleRate); console.log('Resampled data length:', output16k.length); }; ``` ### Response #### Success Response (200) - **return value** (Float32Array) - Resampled 16kHz audio data. #### Response Example ```javascript // Example output of console.log in the usage example // Resampled data length: 12345 ``` ## to16BitPCM - PCM Format Conversion Function ### Description The `to16BitPCM` function converts audio data from Float32Array format to 16-bit PCM format, which is the required audio format for Tencent Cloud speech services. The converted data can be directly sent to the server via WebSocket. ### Method `function to16BitPCM(input)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **input** (Float32Array) - Required - Input Float32 audio data, range [-1, 1]. ### Request Example ```javascript // Complete audio processing workflow example function processAudioForTencentCloud(rawAudioData, sampleRate) { // Step 1: Resample to 16kHz const audio16k = to16kHz(rawAudioData, sampleRate); // Step 2: Convert to 16-bit PCM const pcmData = to16BitPCM(audio16k); // Step 3: Convert to Int8Array for sending const audioBytes = new Int8Array(pcmData.buffer); return audioBytes; } // Usage example const rawAudio = new Float32Array([0.1, -0.2, 0.3, -0.4]); // Simulated audio data const processedAudio = processAudioForTencentCloud(rawAudio, 44100); console.log('Processed PCM data:', processedAudio); ``` ### Response #### Success Response (200) - **return value** (DataView) - 16-bit PCM formatted audio data. #### Response Example ```javascript // Example output of console.log in the usage example // Processed PCM data: Int8Array(8) [ 32, 0, -64, 255, 96, 0, -128, 254 ] ``` ``` -------------------------------- ### SowNewSocketSdk - Automatic Recording Evaluation Source: https://github.com/tencentcloud/tencentcloud-speech-sdk-js/blob/main/soe/README.md The SowNewSocketSdk class manages the entire lifecycle of speech evaluation, including automatic audio recording and WebSocket communication. ```APIDOC ## [POST] SowNewSocketSdk.start ### Description Starts the oral evaluation process using the built-in recording manager. ### Method POST ### Parameters #### Request Body - **secretid** (string) - Required - Tencent Cloud API secret ID - **secretkey** (string) - Required - Tencent Cloud API secret key - **appid** (string) - Required - Tencent Cloud account AppID - **token** (string) - Optional - Temporary security token - **server_engine_type** (string) - Required - Engine type (e.g., '16k_zh') - **eval_mode** (int) - Required - Evaluation mode (0: word, 1: sentence, 2: paragraph, 3: free) - **ref_text** (string) - Required - Reference text for evaluation - **sentence_info_enabled** (int) - Optional - Set to 1 to receive intermediate results ### Response #### Success Response (Callback) - **OnRecognitionResultChange** - Triggered when intermediate evaluation results are available. - **OnRecognitionComplete** - Triggered when the final evaluation result is returned. ``` -------------------------------- ### WebRecorder: Browser Audio Capture Source: https://context7.com/tencentcloud/tencentcloud-speech-sdk-js/llms.txt WebRecorder is an audio capture module for browsers that records microphone audio. It converts audio to 16kHz, 16bit PCM format and supports AudioWorklet or ScriptProcessor. It's suitable for use with SpeechRecognizer or standalone audio capture. ```javascript const requestId = 'recorder-' + Date.now(); const recorderParams = { echoCancellation: true // 是否开启回声消除,设为'false'字符串可关闭 }; const recorder = new WebRecorder(requestId, recorderParams, true); recorder.OnReceivedData = (audioData) => { console.log('收到音频数据,长度:', audioData.length); // speechRecognizer.write(audioData); }; recorder.OnError = (err) => { console.error('录音错误:', err); }; recorder.OnStop = (allAudioData) => { console.log('录音停止,总数据量:', allAudioData.length); }; console.log('支持MediaDevices:', WebRecorder.isSupportMediaDevicesMedia()); console.log('支持getUserMedia:', WebRecorder.isSupportUserMediaMedia()); console.log('支持AudioContext:', WebRecorder.isSupportAudioContext()); recorder.start(); // recorder.stop(); // recorder.destroyStream(); ``` -------------------------------- ### Convert Audio to 16-bit PCM Source: https://context7.com/tencentcloud/tencentcloud-speech-sdk-js/llms.txt The to16BitPCM function converts Float32Array audio data (range [-1, 1]) into 16-bit PCM format. This format is required for transmission via WebSocket to Tencent Cloud services. ```javascript function to16BitPCM(input) { const dataLength = input.length * (16 / 8); const dataBuffer = new ArrayBuffer(dataLength); const dataView = new DataView(dataBuffer); let offset = 0; for (let i = 0; i < input.length; i++, offset += 2) { const s = Math.max(-1, Math.min(1, input[i])); dataView.setInt16(offset, s < 0 ? s * 0x8000 : s * 0x7fff, true); } return dataView; } ``` -------------------------------- ### Resample Audio to 16kHz Source: https://context7.com/tencentcloud/tencentcloud-speech-sdk-js/llms.txt The to16kHz function resamples raw Float32Array audio data to 16kHz using linear interpolation. This is a mandatory step to meet the sampling rate requirements of Tencent Cloud speech services. ```javascript function to16kHz(audioData, sampleRate = 44100) { const data = new Float32Array(audioData); const fitCount = Math.round(data.length * (16000 / sampleRate)); const newData = new Float32Array(fitCount); const springFactor = (data.length - 1) / (fitCount - 1); newData[0] = data[0]; for (let i = 1; i < fitCount - 1; i++) { const tmp = i * springFactor; const before = Math.floor(tmp); const after = Math.ceil(tmp); const atPoint = tmp - before; newData[i] = data[before] + (data[after] - data[before]) * atPoint; } newData[fitCount - 1] = data[data.length - 1]; return newData; } ``` -------------------------------- ### SowNewSocketSdk: Integrated Speech Evaluation Source: https://context7.com/tencentcloud/tencentcloud-speech-sdk-js/llms.txt SowNewSocketSdk is a comprehensive speech evaluation class that integrates audio recording and evaluation. It supports word, sentence, paragraph, and free talk modes via WebSocket for real-time evaluation, ideal for quick integration of English pronunciation assessment. ```javascript const params = { secretid: 'YOUR_SECRET_ID', secretkey: 'YOUR_SECRET_KEY', appid: 'YOUR_APP_ID', // token: 'YOUR_TEMP_TOKEN', ref_text: 'Hello, how are you?', eval_mode: 1, server_engine_type: '16k_zh', sentence_info_enabled: 1, score_coeff: 1.0, text_mode: 0, }; const soeManager = new SowNewSocketSdk(params, true); soeManager.OnEvaluationStart = (res) => { console.log('开始评测', res); }; soeManager.OnEvaluationResultChange = (res) => { console.log('评测中间结果', res); }; soeManager.OnEvaluationComplete = (res) => { console.log('评测完成', res); if (res.result) { console.log('总分:', res.result.SuggestedScore); console.log('发音准确度:', res.result.PronAccuracy); console.log('流利度:', res.result.PronFluency); console.log('完整度:', res.result.PronCompletion); } }; soeManager.OnError = (err) => { console.error('评测错误', err); }; soeManager.OnRecorderStop = (res) => { console.log('录音停止', res); }; soeManager.start(); // soeManager.stop(); // soeManager.destroyStream(); // const logs = await soeManager.OndownloadLogs(); ``` -------------------------------- ### Generate HMAC-SHA1 Authentication Signature Source: https://context7.com/tencentcloud/tencentcloud-speech-sdk-js/llms.txt The signCallback function generates an HMAC-SHA1 signature for API authentication. It is recommended to perform this operation on the server side to prevent SecretKey exposure. ```javascript function signCallback(secretKey, signStr) { const hash = CryptoJS.HmacSHA1(signStr, secretKey); const words = hash.words; const sigBytes = hash.sigBytes; const u8 = new Uint8Array(sigBytes); for (let i = 0; i < sigBytes; i++) { u8[i] = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; } let dataString = ''; for (let i = 0; i < u8.length; i++) { dataString += String.fromCharCode(u8[i]); } return btoa(dataString); } ``` -------------------------------- ### SpeechRecognizer API Source: https://github.com/tencentcloud/tencentcloud-speech-sdk-js/blob/main/asr/README.md The SpeechRecognizer class handles the WebSocket connection and streaming of audio data to the Tencent Cloud speech recognition engine. ```APIDOC ## SpeechRecognizer ### Description Manages the WebSocket connection and streaming of audio buffers for speech recognition. ### Parameters - **params** (Object) - Required - Configuration parameters (e.g., engine_model_type: '16k_zh'). - **requestId** (String) - Optional - Unique ID for local debugging. - **isLog** (Boolean) - Optional - Enable local logging. ### Methods - **start()**: Establishes the WebSocket connection. - **write(data)**: Sends audio data to the server. - **stop()**: Closes the connection. ### Events - **OnRecognitionStart**: Connection established. - **OnRecognitionResultChange**: Intermediate recognition results. - **OnRecognitionComplete**: Final recognition results. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.