Handheld dual data stream translation control method and storage medium
Patent Information
- Application Number
- CN202611450291.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-18
- Publication Date
- 2026-10-23
AI Technical Summary
[0005]本发明的目的在于提出一种手咪双数据流翻译控制方法,以解决手咪作为外部翻译设备的前端采集与控制终端时,语音数据与控制命令之间缺乏统一语音段标识和可靠绑定机制,导致翻译控制事件无法准确作用于对应语音段、易出现错翻或漏翻的技术问题
1、本发明通过在手咪端生成独立并行的语音流A和翻译控制流C,并使两股数据流共同携带统一的语音段标识sid及各自的时间戳,建立了语音数据与控制命令之间的可靠关联机制。外部翻译设备能够依据sid以及第一时间戳与第二时间戳之间的时间距离Δt(j,k),准确判断每一控制事件所归属的语音段,即使在语音流与控制流因音频缓存、按键消抖、链路排队或重发等因素出现到达时间差的情况下,仍可恢复正确的事件归属关系。由此,确认翻译、取消翻译、目标语言选择等控制操作均能精准作用于预期的语音段,克服了现有方案中控制事件与语音段之间缺乏绑定机制而导致的翻译对象错位问题。
Smart Images

Figure CN122967628A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of language data processing technology, and specifically relates to a hand-microphone dual data stream translation control method and storage medium. Background Technology
[0002] Handheld microphones, as low-line-of-sight voice interaction terminals, are widely used in scenarios such as on-duty announcements, vehicle-mounted command and control, and emergency broadcasting. In these applications, handheld microphones typically function as front-end acquisition and control devices, transmitting audio signals to external devices such as mobile phones, vehicle-mounted hosts, or dedicated translation boxes to complete speech recognition, machine translation, and speech synthesis. Therefore, the core problem that handheld microphones need to solve is not the translation model itself, but rather how to establish a reliable correspondence between the acquired speech segments and the user's language selection, translation confirmation, and other control operations.
[0003] Existing handheld microphones mainly fall into two categories. One category consists of ordinary USB handheld microphones, wireless handheld microphones, or PTT microphones. Their technology focuses on sound pickup, button gating, and audio transmission. While they can transmit audio and button status to the host, they lack a traceable translation control relationship, and there is no binding mechanism between events such as language selection and translation confirmation and the voice segment. The other category comprises integrated translation terminals or translation walkie-talkies, which integrate the microphone, screen, and translation module into one unit. Although they possess complete translation functions, they rely on screen menu operation, making them unsuitable for high-noise or blind operation environments such as driving or duty. Furthermore, their technology revolves around the translation device itself and does not address how an independent handheld microphone can collaboratively control an external translation device via data flow.
[0004] In summary, none of the existing solutions disclose a complete technical solution for achieving translation control via a collaborative mechanism between voice stream and control stream on the handheld microphone. Summary of the Invention
[0005] The purpose of this invention is to propose a handheld microphone dual-data-stream translation control method to solve the technical problem that when the handheld microphone is used as the front-end acquisition and control terminal of an external translation device, the lack of a unified voice segment identifier and reliable binding mechanism between voice data and control commands leads to translation control events not being able to accurately act on the corresponding voice segments, and is prone to mistranslation or omission.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: A handheld microphone dual-data-stream translation control method is applied to a handheld microphone terminal, wherein the handheld microphone terminal is communicatively connected to an external translation device, the method comprising: Generate a voice stream A, wherein the audio frames in the voice stream A carry audio data collected by the microphone, a voice segment identifier sid, and a first timestamp; A translation control flow C is generated, wherein the translation control flow C carries a control event generated based on the user's hand microphone button operation and / or feedback from an external translation device, a second timestamp, and a speech segment identifier sid associated with the control event; The speech stream A and the translation control stream C are sent to the external translation device. At the same time, the control event is bound to the corresponding speech segment according to the speech segment identifier sid, the first timestamp and the second timestamp, and the translation control is executed according to the binding result.
[0007] Compared with the prior art, the hand-microphone dual data stream translation control method of the present invention has the following advantages: 1. This invention establishes a reliable association mechanism between voice data and control commands by generating independent and parallel voice stream A and translation control stream C at the handheld microphone, and by having both data streams carry a unified voice segment identifier sid and their respective timestamps. The external translation device can accurately determine the voice segment to which each control event belongs based on sid and the time distance Δt(j,k) between the first and second timestamps. Even if there is a time difference in arrival between the voice stream and the control stream due to factors such as audio buffering, key debouncing, link queuing, or retransmission, the correct event attribution relationship can still be restored. Therefore, control operations such as confirming translation, canceling translation, and selecting the target language can be accurately applied to the expected voice segment, overcoming the translation object misalignment problem caused by the lack of a binding mechanism between control events and voice segments in existing solutions.
[0008] 2. This invention integrates core control functions such as language selection, translation confirmation, translation cancellation, translation replay, and silence control into the button operation of the handheld microphone. Users can complete the entire translation process without relying on the on-screen menu. The handheld microphone automatically divides the speech segment boundaries based on the PTT button status and VAD result. Users can trigger translation confirmation, translation cancellation, or target language switching at any time during or after speaking within the confirmation window. Control events are dynamically bound to the corresponding speech segments according to the SID. This design fully adapts to the low-line-of-sight operation requirements of scenarios such as duty announcements, vehicle command, and emergency broadcasts, where drivers or operators cannot take their eyes off the task for extended periods, reducing the operational burden and improving interaction efficiency.
[0009] 3. This invention divides the target language state into a three-layer structure: candidate language Lc, locked language Ll, and actual language Lk for the speech segment. Users update only the candidate language Lc by briefly pressing the language key and receive a prompt through the status feedback unit. Only after explicit user confirmation or the fulfillment of preset confirmation conditions will the candidate language Lc be updated to the locked language Ll. For the currently being acquired speech segment, language switching events occurring after the start of the speech segment default to the next speech segment, rather than immediately changing the translation target of the current speech segment. This avoids erroneous changes to the translation target of the currently acquired speech segment due to accidental user presses of the language key. This layered management mechanism significantly improves the fault tolerance of translation control while ensuring the flexibility of language switching.
[0010] 4. This invention processes multiple control events associated with the same speech segment according to preset priorities. Silence or emergency cancellation has the highest priority, enabling timely prevention of inappropriate translations. Events such as translation cancellation, PTT release, speech segment end, translation confirmation, and target language confirmation are sequentially downgraded. When a high-priority event conflicts with a low-priority event, the processing result of the high-priority event overrides or suppresses the low-priority event, avoiding confusion in translation behavior when multiple control events overlap. Simultaneously, the external translation device performs deduplication based on the control packet sequence number (cseq). For duplicate control events, the translation operation is not triggered repeatedly; the stored execution result is directly returned, ensuring that the same speech segment is not translated repeatedly, thus improving the system's control reliability in weak network or jitter environments.
[0011] 5. This invention introduces control packet sequence number cseq, ACK waiting, timeout retransmission (Tack and Nretry working together), and duplicate packet deduplication mechanism into the translation control flow C. This ensures that each critical operation in the control link receives explicit feedback from the external translation device. When a control packet is lost, it can be retransmitted promptly, and when a duplicate packet arrives, it can return a result idempotently, effectively maintaining the synchronization of the control state between the handheld microphone and the external translation device. Furthermore, this invention designs corresponding processing strategies for various abnormal scenarios, such as the voice stream arriving before the control event, the control event arriving before the voice segment, and inconsistencies between the voice segment and the acknowledgment event. Abnormal data can be placed in an abnormal queue, and the user can be prompted to perform reconfirmation, cancellation, or repeat operations through a status feedback unit. This reduces the probability of translation failure or state confusion due to link anomalies, improving the robustness of the system and the user experience.
[0012] In summary, this invention effectively solves the technical challenge of lacking a unified identifier and reliable binding mechanism between voice data and control commands when a handheld microphone is used as the front-end acquisition terminal of an external translation device. This is achieved through a combination of technical means, including dual-stream collaboration of voice and control streams, bidirectional binding based on SID and timestamps, hierarchical language management, control event arbitration and deduplication, and ACK confirmation and anomaly recovery. It enables control events to be accurately applied to the corresponding voice segments and is suitable for voice translation control needs in low-line-of-sight, high-noise, and blind operation scenarios such as duty, vehicle-mounted, and emergency broadcasting. It has significant technological advancements and practical value. Attached Figure Description
[0013] Figure 1 This is a flowchart of the hand-microphone dual data stream translation control method according to an embodiment of the present invention; Figure 2 This is a schematic diagram illustrating the connection between the handheld microphone and an external translation device according to an embodiment of the present invention. Detailed Implementation
[0014] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments: Example 1 like Figure 1 , Figure 2 As shown, this embodiment proposes a handheld microphone dual-data-stream translation control method, applied to a handheld microphone terminal, which communicates with an external translation device. The handheld microphone terminal is responsible for voice acquisition, voice segment division and SID allocation, control event generation, and dual-stream transmission; the external translation device is responsible for dual-stream buffering, binding, arbitration, translation execution, and ACK feedback. The handheld microphone terminal synchronizes its local state based on the ACK.
[0015] The method includes the following steps: (1) Power-on initialization and status synchronization.
[0016] After the handheld microphone is powered on, the main control unit initializes the communication interface, audio encoding / decoding unit, key input unit, status feedback unit, and local clock, respectively establishing a voice stream A logical channel for transmitting voice data and a translation control stream C logical channel for transmitting translation control information. After initialization, the handheld microphone can send device capabilities, key configuration, supported language list versions, and current operating status to the external translation device. The external translation device returns status synchronization response information, which includes the set of available target languages, enabling the handheld microphone and the external translation device to synchronize their status before voice acquisition begins.
[0017] (2) Generate speech segments and assign speech segment identifiers sid.
[0018] The microphone captures user speech and generates analog audio signals. The audio codec unit converts these analog audio signals into digital audio frames. The main control unit generates speech segment boundaries based on the PTT key state and the Voice Activity Detection (VAD) result, and assigns a unique speech segment identifier (sid) to each speech segment. In the implementation primarily based on the PTT key state, when the PTT key changes from released to pressed, a speech segment start marker is generated and a new sid is created; when the PTT key is released, a speech segment end marker is generated after a preset tail-end protection time to preserve valid speech at the end of the user's statement. In the implementation primarily based on the VAD result, when the PTT key remains pressed and the speech energy is below a preset threshold and continues to exceed a silence threshold, a sub-speech segment boundary is further formed. During the duration of a speech segment, the main control unit writes all continuously acquired audio frames into the same speech segment identifier (sid) and records the start and end times of the speech segment. This forms the k-th speech segment data S_k with a unique sid, where k represents the speech segment number, used for subsequent generation of speech stream A and control event binding.
[0019] (3) Generate speech stream A.
[0020] The main control unit encapsulates digital audio frames into a continuous speech stream A according to the acquisition order of audio frames in the speech segment data S_k. Each audio frame in speech stream A carries audio data acquired by the microphone, a speech segment identifier sid, and a first timestamp. Speech stream A consists of multiple consecutive audio packets, each carrying an audio packet sequence number aseq, an audio payload x, and a PTT key status p. The first timestamp characterizes the acquisition time of the corresponding audio frame; for the k-th speech segment, the first timestamp carried by the last frame of that segment is used as tA(k) so that the external translation device can perform timing correction when there is a transmission delay difference between speech stream A and translation control stream C.
[0021] (4) Generate translation control flow C.
[0022] The translation control flow C carries a control event generated based on the user's hand-microphone button operation and / or feedback from an external translation device, a second timestamp, and the speech segment identifier sid associated with the control event.
[0023] Control events include at least one of the following: target language selection, translation confirmation, translation cancellation, translation replay, silence control, PTT status update, and playback control.
[0024] For each control event, the master control unit generates a corresponding control packet. The control packet carries at least a second timestamp and the speech segment identifier sid associated with the control event. In an optional implementation, it also carries the control packet sequence number cseq, the event type e, the event value v, and the control event acknowledgment status r.
[0025] The second timestamp is used to record the occurrence time of the control event. If the corresponding voice segment can be determined when the control event occurs, the corresponding SID is directly written into the control packet; if the corresponding voice segment cannot be determined when the control event occurs, the control event is first placed in the candidate control queue, and the association between the control event and the SID is established after the assigned voice segment is determined based on time relationships or subsequent states. Voice stream A and translation control stream C are logically independent and can be transmitted through different endpoints of the same USB composite interface or through different logical channels in the same wireless connection.
[0026] After receiving the control packet from the translation control flow C, the external translation device returns an ACK confirmation message for the control event. The ACK confirmation message includes the control packet sequence number (cseq), the voice segment identifier (sid), the execution status, and the error code. The handheld microphone updates its local control status based on the ACK confirmation message and notifies the user, through status indicator lights, sounds, vibrations, or other status feedback methods, whether the current control event has been received and executed by the external translation device.
[0027] (5) Control events are bound to voice segments.
[0028] Voice stream A and translation control stream C are sent to an external translation device. Simultaneously, the control event is bound to the corresponding voice segment based on the voice segment identifier sid, the first timestamp, and the second timestamp, and translation control is executed according to the binding result. The external translation device caches and manages each voice segment according to sid, and determines whether the control event should apply to the current voice segment, the previous voice segment, or the next voice segment based on the voice segment identifier sid, the first timestamp, and the second timestamp.
[0029] The binding relationship between control events and corresponding speech segments is determined by the external translation device based on the following methods: matching is prioritized according to the SID; if the SIDs match, timing verification is performed using both the first and second timestamps; if the SID associated with a control event has not yet been determined, the assigned SID is determined within the confirmation time window based on the time distance between the two timestamps. Specifically: Calculate the time distance Δt(j,k) between the control event and the speech segment = |tC(j) - tA(k)|, where j represents the control event number, k represents the speech segment number, tC(j) is the second timestamp of the j-th control event, and tA(k) is the first timestamp carried by the last frame of the k-th speech segment; If Δt(j,k)≤Δmax, then the control event is determined to fall within the confirmation time window of the voice segment, where Δmax is a preset confirmation time window threshold. When the sid associated with the control event has not yet been determined, if multiple speech segments all satisfy Δt(j,k)≤Δmax, then the speech segment with the smallest Δt(j,k) value is selected as the speech segment to which the control event belongs.
[0030] Through the above binding method, different types of control events, such as target language selection, translation confirmation, translation cancellation, translation replay, silence control, and playback control, can all be associated with specific audio segments. Even when there is a time difference in arrival between audio stream A and translation control stream C due to audio buffering, key debouncing, link queuing, or retransmission, the external translation device can still restore the correct event attribution based on the SID and timestamp.
[0031] After binding is completed, a binding result B_k is obtained. The binding result B_k includes speech segment data S_k and its valid control events, and serves as input for determining the actual language Lk of the speech segment and arbitrating the control events.
[0032] (6) Hierarchical management of target language.
[0033] The handheld microphone divides the target language status into candidate language Lc, locked language Ll, and actual language of the speech segment Lk.
[0034] In response to a short press of the language key by the user, the candidate language Lc is updated, and the current candidate language is indicated through a status feedback unit. In response to a user's press of the confirmation key or the fulfillment of a preset confirmation condition, the candidate language Lc is updated to the locked language Ll. This hierarchical approach of candidate and locked languages avoids immediately changing the translation target of the current speech segment when the user accidentally presses a language key during voice acquisition.
[0035] For the current audio segment being captured, if the language switching event occurs after the start of the audio segment and has not yet been confirmed, the audio switching event will default to the next audio segment. If the user explicitly presses the confirm translation button in the confirmation window corresponding to the current audio segment, the locked language Ll will be bound to the current audio segment identifier sid, and the locked language Ll will be used as the actual language Lk of the audio segment.
[0036] The method for determining the actual language Lk of a speech segment is as follows: If there exists a valid control event bound to a speech segment, then Lk = L_target(j), where L_target(j) is the target language carried by the j-th control event; If there is no control event bound to a speech segment, but there is a currently locked language Ll, then Lk = Ll; If none of the above conditions are met, then Lk = L0, where L0 is the default target language.
[0037] By defining the layers as described above, each speech segment can have a clear and traceable actual target language before translation can be performed.
[0038] (7) Confirm the collaborative processing of translation and speech segment boundaries.
[0039] When a confirmation translation event is triggered before the end of a speech segment, the handheld microphone sends a corresponding confirmation translation control event. The external translation device marks it as "to be translated after the speech ends." The subsequent translation process is executed after the handheld microphone completes the acquisition and transmission of the current speech segment, so as to avoid premature truncation of the sentence.
[0040] When a translation confirmation event is triggered within the confirmation window after the end of a speech segment, the external translation device binds the translation confirmation event to the corresponding speech segment based on the SID and time distance, and immediately triggers the translation of that speech segment.
[0041] If the confirmation window times out without being confirmed, the external translation device will mark the speech segment as not to be translated or process it according to the default policy.
[0042] (8) Control event priority arbitration.
[0043] Multiple control events associated with the same audio segment are processed according to a preset priority. The priority of the control events, from high to low, is as follows: silence or emergency cancellation, cancel translation, release of PTT key and end of audio segment, confirm translation, target language confirmation, target language candidate, replay translation and playback control. When there is a conflict between high-priority control events and low-priority control events, the processing result of the high-priority control event shall override or suppress the low-priority control event. For duplicate control events associated with the same speech segment, deduplication is performed based on the control packet sequence number cseq, and the latest valid control event is retained or the stored execution result is returned to avoid repeatedly triggering translation control operations.
[0044] Before performing translation, the external translation device comprehensively assesses the completeness of the speech segment, the validity of the actual target language, the translation confirmation status, and the cancellation, silence, or playback prohibition status. Only when the corresponding speech segment is fully formed, the actual language Lk of the speech segment is valid, the translation confirmation event is valid, and there are no cancellation, silence, or execution prohibition statuses, does the external translation device generate a translation execution request E_k based on S_k, Lk, and the arbitrated valid control status, and accordingly performs speech recognition, machine translation, speech synthesis, and / or translation playback. The above assessment is only used to determine whether to initiate the translation process for the corresponding speech segment and does not limit the specific translation algorithm used internally by the external translation device.
[0045] (9) Perform ACK confirmation, retransmission and deduplication of duplicate control packets.
[0046] The master control unit assigns a control packet sequence number cseq to each control packet in the translation control flow C, and initiates ACK waiting after the control packet is sent; If an ACK confirmation message is received from an external translation device within the preset waiting time Tack, the handheld microphone will write the execution result into the corresponding control event status based on the cseq and sid in the ACK. If an ACK confirmation message is not received from the external translation device within the preset waiting time Tack, the corresponding control packet will be resent according to the preset number of retransmissions Nretry; When an external translation device receives a duplicate control packet with the same CSeq, it does not trigger the same translation control operation repeatedly. Instead, it queries the stored execution result corresponding to the CSeq and repackages the stored execution result into an ACK and returns it to the handheld microphone.
[0047] By coordinating cseq, ACK, Tack, and Nretry, the control state between the handheld microphone and the external translation device can be kept consistent even when there is packet loss or duplicate transmission in the control link, and the same voice segment can be avoided from being translated repeatedly.
[0048] (10) Perform abnormal recovery.
[0049] When voice stream A has arrived at the external translation device but its corresponding confirmation translation control event is lost, the external translation device can keep the voice segment in a pending confirmation state. When the control event in the translation control stream C has arrived but the corresponding voice stream A has not yet arrived or the voice segment is missing, the external translation device can return to the "waiting for voice segment" execution state. When an inconsistency is detected between the voice segment, the target language state, and the confirmation event, the corresponding data is placed in the exception queue, and the user is prompted to perform a reconfirmation, cancellation, or repeat operation through the ACK error code and the status feedback unit.
[0050] In cases where external translation devices are busy, translation fails, or playback fails, the execution status and error code in the ACK can be fed back to the handheld microphone. The handheld microphone maintains the current SID and its control state according to the error type, or restores to the pending confirmation state according to a preset strategy, so that the user can continue to perform the reconfirmation, cancellation, or repeat operation without having to reselect all parameters.
[0051] This embodiment uses a normal handheld microphone translation control process as an example: After powering on, the user completes state synchronization, selects a candidate language via the language key, and confirms it as the locked language; then, the user presses the PTT button to start speaking, and the handheld microphone creates a new SID and continuously sends a speech stream A carrying the SID and the first timestamp; during or after speaking, the user presses the confirm translation button in the confirmation window, and the handheld microphone generates a confirm translation control event carrying the CSEQ, SID, and second timestamp, and sends it through the translation control flow C; the external translation device completes dual-stream binding based on the SID and the first and second timestamps, determines the actual target language Lk of the speech segment according to the target language layering rules, and performs recognition, translation, synthesis, and playback according to the translation execution request E_k after the translation execution conditions are met, and returns an ACK containing the CSEQ, SID, execution status, and error code. If the user subsequently triggers a replay or cancellation, the corresponding control event is still processed according to the same SID and control flow mechanism.
[0052] After the current voice segment is processed, the external translation device returns a completion status. The handheld microphone clears the temporary confirmation status, candidate control queue item, and retransmission timer status of that voice segment, and can retain the currently locked language. The language is set as the default locking language for the next voice segment, and then the system returns to standby mode. The execution order of the above steps is used to illustrate the complete working process of this embodiment. Without affecting the consistency of voice segment binding and control state, some state synchronization, ACK processing, and voice data transmission steps can be executed in parallel or overlapping.
[0053] Example 2 This embodiment 2 describes a computer-readable storage medium storing a program that, when executed by a processor, is used to implement the steps of the hand-microphone dual data stream translation control method in embodiment 1 above.
[0054] The computer-readable storage medium can be an internal storage unit of any device or apparatus with data processing capabilities, such as a hard disk or memory, or an external storage device of any device with data processing capabilities, such as a plug-in hard disk, smart media card (SMC), SD card, flash card, etc.
[0055] The present invention has now been described in detail with reference to the accompanying drawings. Based on the above description, those skilled in the art should have a clear understanding of the present invention. Of course, the above description is merely a preferred embodiment of the present invention, and the present invention is not limited to the embodiments listed above. It should be noted that any equivalent substitutions or obvious modifications made by those skilled in the art under the guidance of this specification fall within the scope of this specification and should be protected by the present invention.
Claims
1. A handheld microphone dual-datastream translation control method, characterized in that, Applied to a handheld microphone, wherein the handheld microphone is communicatively connected to an external translation device, the method includes: Generate a voice stream A, wherein the audio frames in the voice stream A carry audio data collected by the microphone, a voice segment identifier sid, and a first timestamp; A translation control flow C is generated, wherein the translation control flow C carries a control event generated based on the user's hand microphone button operation and / or feedback from an external translation device, a second timestamp, and a speech segment identifier sid associated with the control event; The speech stream A and the translation control stream C are sent to the external translation device. At the same time, the control event is bound to the corresponding speech segment according to the speech segment identifier sid, the first timestamp and the second timestamp, and the translation control is executed according to the binding result.
2. The hand-microphone dual-data-stream translation control method according to claim 1, characterized in that, The control events include at least one of the following: target language selection, translation confirmation, translation cancellation, replay of translation, silence control, PTT status update, and playback control; The method further includes: The external translation device returns ACK confirmation information in response to the control event. The ACK confirmation information includes the control packet sequence number cseq, the voice segment identifier sid, the execution status, and the error code.
3. The hand-microphone dual-data-stream translation control method according to claim 1, characterized in that, Generating speech stream A also includes generating speech segments and assigning speech segment identifiers sid: The speech segment boundaries are generated based on the PTT key status and / or speech activity detection results, and a unique speech segment identifier sid is assigned to each speech segment. Specifically, a voice segment start marker is generated when the PTT key is pressed, and a voice segment end marker is generated after the PTT key is released and a preset tail note protection time has elapsed. During the duration of a speech segment, all continuously acquired audio frames are written to the same speech segment identifier sid, and the start and end times of the speech segment are recorded.
4. The hand-microphone dual-data-stream translation control method according to claim 1, characterized in that, The binding relationship between the control event and the corresponding speech segment is determined by the external translation device based on the following method: Calculate the time distance Δt(j,k) between the control event and the speech segment = |tC(j) - tA(k)|, where j represents the control event number, k represents the speech segment number, tC(j) is the second timestamp of the j-th control event, and tA(k) is the first timestamp carried by the last frame of the k-th speech segment; If Δt(j,k)≤Δmax, then the control event is determined to fall within the confirmation time window of the voice segment, where Δmax is a preset confirmation time window threshold. If multiple speech segments all satisfy Δt(j,k)≤Δmax, then the speech segment with the smallest Δt(j,k) value is selected as the speech segment to which the control event belongs.
5. The hand-microphone dual-data-stream translation control method according to claim 1, characterized in that, It also includes a hierarchical management approach for the target language: The handheld microphone divides the target language status into candidate language Lc, locked language Ll, and actual language of the speech segment Lk; In response to a user's short press of the language key, update the candidate language Lc; In response to the user's operation of the confirmation key or the achievement of preset confirmation conditions, the candidate language Lc is updated to the locked language Ll; For the current audio segment being captured, if the language switching event occurs after the start of the audio segment and has not yet been confirmed, the audio switching event will default to the next audio segment. If the user explicitly presses the confirm translation button in the confirmation window corresponding to the current audio segment, the locked language Ll will be bound to the current audio segment identifier sid, and the locked language Ll will be used as the actual language Lk of the audio segment.
6. The hand-microphone dual-data-stream translation control method according to claim 5, characterized in that, The method for determining the actual language Lk of the speech segment is as follows: If there exists a valid control event bound to a speech segment, then Lk = L_target(j), where L_target(j) is the target language carried by the j-th control event; If there is no control event bound to a speech segment, but there is a currently locked language Ll, then Lk = Ll; If none of the above conditions are met, then Lk = L0, where L0 is the default target language.
7. The hand-microphone dual-data-stream translation control method according to claim 1, characterized in that, It also includes collaborative processing methods for confirming the boundaries between translation and speech segments: When a confirmation translation event is triggered before the end of a speech segment, the confirmation translation event will be marked as "Translate after the speech ends"; When a translation confirmation event is triggered in the confirmation window after the end of a speech segment, the translation of that speech segment is triggered immediately. If the confirmation window times out without confirmation, the audio segment will be marked as not to be translated or processed according to the default policy.
8. The hand-microphone dual-data-stream translation control method according to claim 1, characterized in that, It also includes a method for arbitrating event priorities: Multiple control events associated with the same audio segment are processed according to a preset priority. The priority of the control events, from high to low, is as follows: silence or emergency cancellation, cancel translation, release of PTT key and end of audio segment, confirm translation, target language confirmation, target language candidate, replay translation and playback control. When there is a conflict between high-priority control events and low-priority control events, the processing result of the high-priority control event shall override or suppress the low-priority control event. For duplicate control events associated with the same speech segment, deduplication is performed based on the control packet sequence number cseq, and the latest valid control event is retained or the stored execution result is returned to avoid repeatedly triggering translation control operations.
9. The hand-microphone dual-data-stream translation control method according to claim 1, characterized in that, It also includes methods for performing ACK confirmation, retransmission, and deduplication of duplicate control packets: Assign a control packet sequence number cseq to each control packet in the translation control flow C, and start ACK waiting after the control packet is sent; If an ACK confirmation message is received from an external translation device within the preset waiting time Tack, the execution result will be written into the corresponding control event status according to the cseq and sid in the ACK. If an ACK confirmation message is not received from the external translation device within the preset waiting time Tack, the corresponding control packet will be resent according to the preset number of retransmissions Nretry; When an external translation device receives a duplicate control packet with the same CSeq, it does not trigger the same translation control operation repeatedly. Instead, it queries the stored execution result corresponding to the CSeq and repackages the stored execution result into an ACK and returns it to the handheld microphone.
10. A computer-readable storage medium having a program stored thereon, characterized in that, When the program is executed by the processor, it implements the hand-microphone dual data stream translation control method as described in any one of claims 1 to 9.