Recording method, device, equipment, medium and program product
By obtaining and processing voice stream data of both parties to the call center scene and synthesizing dual-channel recordings, the problem of poor mono recording utilization is solved, and the distinction between voices between parties to the call and efficient utilization of recording files is achieved.
Patent Information
- Application Number
- CN202411754177.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-03-07
AI Technical Summary
In the call center scenario, the prior art adopts mono recording method, resulting in poor availability of recordings. Especially in AI intelligent application scenarios, it is impossible to distinguish the voice of both parties in the call.
By obtaining the voice stream data of both parties to the call, the linear voice stream data in PCM format is processed respectively, and through the synthesis algorithm, the two-channel recording data is synthesized using the left channel and the right channel.
It realizes the recording of dual-channel recording files, which can distinguish the voice of both parties in the call, improves the availability of recording files, and is suitable for quality inspection and intelligent auxiliary scenarios.
Smart Images

Figure CN119583712A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a two-channel recording method, device, equipment, medium and program product. Background Art
[0002] In the related art, in call center scenarios, the sound quality of the recording is usually not high, but the compression ratio of the recording file is more important. Therefore, mono recording is usually used for recording. However, mono recording can usually only be used in manual listening scenarios, resulting in poor usability of the recording. Summary of the invention
[0003] The present disclosure provides a recording method, device, equipment, medium and program product. The technical solution of the present disclosure is as follows:
[0004] In a first aspect, the present disclosure provides a recording method, comprising:
[0005] Acquire first voice stream data of a first user and second voice stream data of a second user; wherein the first user and the second user are the two parties of the call in the recording;
[0006] Processing the first voice stream data and the second voice stream data into linear voice stream data in PCM format respectively; wherein the linear voice stream data includes first linear voice stream data of the first user and second linear voice stream data of the second user;
[0007] Through a synthesis algorithm, the two-channel recording data is synthesized in the form of the first channel being the first linear voice stream data and the second channel being the second linear voice stream data.
[0008] In a possible implementation manner, obtaining the first voice stream data of the first user and the voice stream data of the second user includes:
[0009] Acquire transmission parameters of voice stream data; the transmission parameters include SSRC identifier, source IP and port, and timestamp;
[0010] Determine first voice stream data of the first user and second voice stream data of the second user according to the SSRC identifier, source IP and port of the voice stream data;
[0011] The first voice stream data and the second voice stream data are stored in chronological order according to the timestamps of the voice stream data.
[0012] In a possible implementation manner, after the first voice stream data and the second voice stream data are respectively processed into linear voice stream data in PCM format, the method further includes:
[0013] Performing noise reduction processing on the linear voice stream data to obtain noise-reduced linear voice stream data; the noise-reduced linear voice stream data includes first noise-reduced linear voice stream data and second noise-reduced linear voice stream data;
[0014] The method of synthesizing the two-channel recording data by using a synthesis algorithm in a form where the first channel is the first linear voice stream data and the second channel is the second linear voice stream data includes:
[0015] Through a synthesis algorithm, the two-channel recording data is synthesized in the form of the first channel being the first linear voice stream data after the noise reduction processing and the second channel being the second linear voice stream data after the noise reduction processing.
[0016] In a possible implementation manner, after obtaining the linear speech stream data after noise reduction processing, the method further includes:
[0017] Performing gain clarity processing on the linear voice stream data after the noise reduction processing to obtain the linear voice stream data after the gain clarity processing; the linear voice stream data after the gain clarity processing includes the first linear voice stream data after the gain clarity processing and the second linear voice stream data after the gain clarity processing;
[0018] The method of synthesizing the two-channel recording data by using a synthesis algorithm in a form where the first channel is the first linear voice stream data and the second channel is the second linear voice stream data includes:
[0019] Through a synthesis algorithm, the two-channel recording data is synthesized in the form of the first channel being the first linear voice stream data after the gain clarity processing and the second channel being the second linear voice stream data after the gain clarity processing.
[0020] In a possible implementation manner, after the first voice stream data and the second voice stream data are respectively processed into linear voice stream data in PCM format, the method further includes:
[0021] The linear voice stream data in PCM format is unified into voice stream data in PCMA format by using an A-law encoding algorithm; the voice stream data in PCMA format includes voice stream data in first PCMA format of the first user and voice stream data in second PCMA format of the second user;
[0022] The method of synthesizing the two-channel recording data by using a synthesis algorithm in a form where the first channel is the first linear voice stream data and the second channel is the second linear voice stream data includes:
[0023] The dual-channel recording data is synthesized by a synthesis algorithm in the form of the first channel being the voice stream data in the first PCMA format and the second channel being the voice stream data in the second PCMA format.
[0024] In a possible implementation manner, the first user and the second user are respectively an agent and a user talking to the agent; the first channel and the second channel are respectively a left channel and a right channel;
[0025] The recording method further comprises:
[0026] The two-channel recording data is stored.
[0027] In a second aspect, the present disclosure provides a recording device, comprising:
[0028] A data acquisition module, used to acquire first voice stream data of a first user and second voice stream data of a second user; wherein the first user and the second user are the two parties of the call in the recording;
[0029] A data processing module, used for processing the first voice stream data and the second voice stream data into linear voice stream data in PCM format respectively; wherein the linear voice stream data includes first linear voice stream data of the first user and second linear voice stream data of the second user;
[0030] The recording synthesis module is used to synthesize dual-channel recording data through a synthesis algorithm in the form of the first channel being the first linear voice stream data and the second channel being the second linear voice stream data.
[0031] In a third aspect, the present disclosure provides an electronic device, including:
[0032] processor;
[0033] a memory for storing instructions executable by the processor;
[0034] The processor is configured to execute the instructions to implement the method described in the first aspect.
[0035] In a fourth aspect, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the method described in the first aspect when executed by a processor.
[0036] In a fifth aspect, the present disclosure provides a computer program product, comprising a computer program / instructions, characterized in that when the computer program / instructions are executed by a processor, the method described in the first aspect is implemented.
[0037] The technical solution disclosed in this disclosure brings at least the following beneficial effects:
[0038] In an embodiment of the present disclosure, by obtaining the first voice stream data of the first user and the second voice stream data of the second user; wherein the first user and the second user are the two parties of the call in the recording; the first voice stream data and the second voice stream data are respectively processed into linear voice stream data in PCM format; wherein the linear voice stream data includes the first linear voice stream data of the first user and the second linear voice stream data of the second user; through a synthesis algorithm, the first channel is the first linear voice stream data, and the second channel is the second linear voice stream data. In this way, the recording of a two-channel recording file can be realized, which can not only distinguish the two parties of the call, but also can be applied to quality inspection scenarios to improve quality inspection efficiency, as well as for other intelligent auxiliary scenarios (such as voice translation into text; with the help of a knowledge base, automatically giving matching answers, assisting agents for reference, etc.), thereby effectively improving the availability of recording files.
[0039] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0041] Figure 1 A flowchart of a recording method provided in the related art;
[0042] Figure 2 is a flowchart of a recording method provided by an embodiment of the present disclosure;
[0043] Figure 3 It is a logical schematic diagram of recording by a call center system provided by an embodiment of the present disclosure;
[0044] Figure 4 is a schematic diagram of a binaural recording synthesis process provided by an embodiment of the present disclosure;
[0045] Figure 5 is a schematic diagram of a voice stream interaction process provided by an embodiment of the present disclosure;
[0046] Figure 6 It is a schematic diagram of an RTP packet header structure provided by an embodiment of the present disclosure;
[0047] Figure 7 It is a schematic diagram of a voice stream decoding process provided by an embodiment of the present disclosure;
[0048] Figure 8 is a schematic diagram of a noise elimination process provided by an embodiment of the present disclosure;
[0049] Fig. 9 is a schematic diagram of a clarity gain process provided by an embodiment of the present disclosure;
[0050] Fig.10 It is a schematic diagram of a voice stream encoding process provided by an embodiment of the present disclosure;
[0051] Fig.11 is a schematic diagram of a recording generation process provided by an embodiment of the present disclosure;
[0052] Fig.12 It is a schematic diagram of recording transcription provided by an embodiment of the present disclosure;
[0053] Fig.13 is a structural schematic diagram of a recording device provided by an embodiment of the present disclosure;
[0054] Fig.14 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0055] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0056] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0057] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this disclosure are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0058] The acquisition, storage, use, and processing of data in the technical solution disclosed in this disclosure are in compliance with the relevant provisions of national laws and regulations.
[0059] It should be noted that in the embodiments of the present disclosure, there may be existing solutions in the industry such as certain software, components, models, etc., which should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present disclosure, but it does not mean that the applicant has or will necessarily use the solution.
[0060] In the related art, in the call center scenario, the sound quality requirements for recordings are usually not high, such as stereoscopic effect, layering, fidelity, etc. There are no requirements, but more concerned about the compression ratio of the recording file, that is, the size of the storage space occupied by the recording file. Therefore, in order to minimize the storage space occupied by the recording file, traditional recording files will adopt a mono recording method. In daily management, mono recording files can already meet general needs. However, in AI (Artificial Intelligence) intelligent application scenarios, AI robots cannot distinguish the two parties in the recording file based on the mono recording file, such as what the customer and the agent said. Exemplarily, the commonly used recording methods in call center systems are: IP packet capture recording, parallel recording (which is divided into extension parallel recording and relay parallel recording) and conference recording.
[0061] Combination Figure 1 , Figure 1 PSTN (Public Switched Telephone Network) is a public switched telephone network; PBX (Private Branch Exchange) is a dedicated telephone network that mainly serves specific enterprises or organizations; CTI (Computer Telephony Integration) is a technology that can closely integrate computer systems with telephone communication systems to achieve two-way transmission of telephone and data; IVR (Interactive Voice Response) is a telephone automatic service system that allows customers to select through voice menu options and interact with the system using voice and numeric keypad. Figure 1 In the figure, the PSTN and PBX are connected through digital trunk lines, and the PBX, IVR conference recording, common agent group, analog parallel recording, trunk parallel recording and IP agent group, IP packet capture recording, CTI server, database server, and application service server are connected through Ethernet cables; the PBX and common agent group are connected through agent telephone lines; dotted lines represent parallel recording. Figure 1, Parallel recording means connecting the voice line to the recording server in parallel, and sending the voice signal to the voice card of the server for recording. The voice signal sent by this method cannot distinguish between the customer and the agent, so dual-channel recording is not supported. Conference recording means creating a three-party conference with the call line and the recording line, and recording the conference through the recording line to complete the recording of the customer's call. This process cannot distinguish between the customer's voice and the agent's voice, so dual-channel recording is not supported. IP packet capture recording, traditional IP packet capture recording is to monitor the fixed port of the network switch, obtain the voice stream of the call by packet capture, and synthesize the recording, but because the voice of the customer and the agent cannot be distinguished in the voice stream, dual-channel recording is not supported.
[0062] Based on this, the disclosed embodiment provides a dual-channel recording method, which imitates the left-right structure of the human ear and uses two independent channels to record the agent and the customer separately. For example, the left channel stores the agent's voice and the right channel stores the user's voice. In this way, during playback, a sound effect with a sense of three-dimensionality and depth can be produced. At the same time, the dual-channel recording not only fully records the conversation process between the agent and the user, but also supports independent listening to the conversation content of the agent and the user, providing data support for the needs of agent assessment, AI intelligent quality inspection, etc. In this way, dual-channel recording file recording can be achieved. Although the dual-channel recording file will double in size, it enables the AI robot to automatically separate the voice of the customer and the agent from the file, and can be widely used in scenarios such as agent assistance, intelligent quality inspection, and intelligent transcription.
[0063] Exemplarily, in the dual-channel recording method provided by the embodiment of the present disclosure, during the conversation between the agent and the user, the recording engine program can store the voice streams of the agent and the user in chronological order according to the SSRC (Synchronization Source Identifier) and timestamp of the voice stream. Through the decoding algorithm in real time, the voice streams of different formats are decoded into PCM (Pulse Code Modulation) linear voice streams. The voice stream is subjected to voice analysis to eliminate unnecessary noise, the amplitude of the voice of the agent and the user is detected, and the gain coefficient is dynamically adjusted to improve the clarity of the voice of the agent and the user in the voice stream. Then, through the encoding algorithm, the processed PCM linear voice stream is uniformly encoded into a PCMA (Pulse Code Modulation A-Law) format voice stream, and finally, through the synthesis algorithm, the voice stream is synthesized into a dual-channel recording in the form of left-channel agent voice and right-channel user voice and stored in a local file.
[0064] The technical solutions provided by various embodiments of the present disclosure are described in detail below in conjunction with the accompanying drawings.
[0065] Figure 2The flowchart of a recording method provided by the embodiment of the present disclosure is as follows. The recording method can be applied to a server, for example, a single server or a server cluster. Figure 2 As shown, the recording method may include the following steps:
[0066] S201, obtaining first voice stream data of a first user and second voice stream data of a second user.
[0067] The first user and the second user are the two parties of the call in the recording.
[0068] In an embodiment of the present disclosure, when performing dual-channel recording, the voice stream data of both parties of the recorded call can be obtained first. Exemplarily, the first user can be one party in the call, such as an agent, and the second user can be the other party of the call, such as a user, or the first user is a user and the second user is an agent, which can be determined according to the actual situation. Acquiring the voice stream data of both parties of the recorded call can be acquiring the voice stream data of the first user, that is, the first voice stream data; and acquiring the voice stream data of the second user, that is, the second voice stream data. As an example, after the call is established, the recording engine program will bind the port of the server, perform voice interaction with the agent and the user, and determine the real-time voice stream data of the agent and the user according to the SSRC identifier of the voice stream, the source IP (Internet Protocol) of the voice stream, and the port. According to the timestamp judgment, the voice stream is discarded and supplemented, and the voice stream data of the agent and the user are stored linearly in chronological order. The recording method provided in the embodiment of the present disclosure is mainly used in call center systems.
[0069] S202, processing the first voice stream data and the second voice stream data into linear voice stream data in PCM format respectively.
[0070] The linear voice stream data includes first linear voice stream data of a first user and second linear voice stream data of a second user.
[0071] In an embodiment of the present disclosure, after obtaining the first voice stream data of the first user and the second voice stream data of the second user, considering that due to the network environment, the requirements of the third-party interactive device, etc., the voice streams may be interacted in formats such as G729, G711A, G711U, etc., therefore, for the convenience of subsequent processing, the recording engine program supports uniform decoding of voice streams of different formats into PCM linear voice streams. Exemplarily, the first voice stream data of the first user can be processed into first linear voice stream data in PCM format, and the second voice stream data of the second user can be processed into second linear voice stream data in PCM format.
[0072] S203, synthesizing the dual-channel recording data by a synthesis algorithm in the form of the first channel being the first linear voice stream data and the second channel being the second linear voice stream data.
[0073] In an embodiment of the present disclosure, after obtaining the linear voice stream data in PCM format, synthesis processing of dual-channel recording data can be performed. Exemplarily, the first linear voice stream data of the first user and the second linear voice stream data of the second user can be synthesized into dual-channel recording data through a synthesis algorithm in the form of dual channels. As an example, the dual-channel recording data can be synthesized in the form of the first channel being the first linear voice stream data and the second channel being the second linear voice stream data. For example, a dual-channel recording can be synthesized in the form of the left channel agent voice and the right channel user voice. In this way, the call process between the agent and the user can be fully recorded, and the independent listening of the call content of the agent and the user can be supported, providing data support for the needs of agent assessment, AI intelligent quality inspection, etc.
[0074] In an embodiment of the present disclosure, by obtaining the first voice stream data of the first user and the second voice stream data of the second user; wherein the first user and the second user are the two parties of the call in the recording; the first voice stream data and the second voice stream data are respectively processed into linear voice stream data in PCM format; wherein the linear voice stream data includes the first linear voice stream data of the first user and the second linear voice stream data of the second user; through a synthesis algorithm, the first channel is the first linear voice stream data, and the second channel is the second linear voice stream data. In this way, the recording of a two-channel recording file can be realized, which can not only distinguish the two parties of the call, but also can be applied to quality inspection scenarios to improve quality inspection efficiency, as well as for other intelligent auxiliary scenarios (such as voice translation into text; with the help of a knowledge base, automatically giving matching answers, assisting agents for reference, etc.), thereby effectively improving the availability of recording files.
[0075] In some possible implementations, obtaining first voice stream data of a first user and voice stream data of a second user includes:
[0076] Get the transmission parameters of voice stream data; the transmission parameters include SSRC identifier, source IP and port, and timestamp;
[0077] Determine first voice stream data of a first user and second voice stream data of a second user according to the SSRC identifier, source IP and port of the voice stream data;
[0078] According to the timestamps of the voice stream data, the first voice stream data and the second voice stream data are stored in time sequence.
[0079] In the disclosed embodiment, when obtaining the first voice stream data of the first user and the voice stream data of the second user, it is necessary to obtain the transmission parameters of the voice stream data, such as SSRC identifier, source IP and port, timestamp and other parameters. Then, the real-time voice stream data of the agent and the user can be distinguished and determined according to the SSRC identifier, source IP and port of the voice stream data, and the first voice stream data of the first user and the second voice stream data of the second user can be obtained. Afterwards, according to the timestamp judgment, the voice stream can be discarded, supplemented and other operations can be performed, and the voice streams of the agent and the user can be stored linearly in chronological order to provide data basis for subsequent processing.
[0080] In some possible implementations, after the first voice stream data and the second voice stream data are respectively processed into linear voice stream data in PCM format, the method further includes:
[0081] Performing noise reduction processing on the linear voice stream data to obtain the noise-reduced linear voice stream data; the noise-reduced linear voice stream data includes the first noise-reduced linear voice stream data and the second noise-reduced linear voice stream data;
[0082] The synthesis algorithm uses a first channel as first linear voice stream data and a second channel as second linear voice stream data to synthesize dual-channel recording data, including:
[0083] Through a synthesis algorithm, the two-channel recording data is synthesized in the form of the first channel being the first linear voice stream data after noise reduction processing and the second channel being the second linear voice stream data after noise reduction processing.
[0084] In the embodiments of the present disclosure, it is taken into consideration that various noises such as background sound and electric current sound are inevitably present during the transmission of sound. Therefore, after the first voice stream data and the second voice stream data are respectively processed into linear voice stream data in PCM format, the linear voice stream data can also be subjected to noise reduction processing to obtain linear voice stream data after noise reduction processing. Exemplarily, the linear voice stream data can be subjected to speech analysis through a recording engine program, a noise spectrum can be produced, a Gain value can be calculated, the speech can be processed, and unnecessary noise can be eliminated. The specific examples are: producing a noise spectrum: recording the spectral characteristics of the noise according to the voice stream signal. Calculating the Gain value (gain value): using the Wiener filtering algorithm to calculate the Gain value according to information such as the noise spectrum, the presence of changes in the voice, and the signal-to-noise ratio. Noise reduction processing: filtering out the noise in the frequency domain noisy signal according to the Gain value. Accordingly, when the dual-channel recording data is synthesized by using a synthesis algorithm in the form of the first channel being the first linear voice stream data and the second channel being the second linear voice stream data, the dual-channel recording data can also be synthesized by using a synthesis algorithm in the form of the first channel being the first linear voice stream data after noise reduction processing and the second channel being the second linear voice stream data after noise reduction processing. In this way, the quality of the dual-channel recording file can be improved.
[0085] In a further possible implementation manner, after obtaining the linear speech stream data after noise reduction processing, the method further includes:
[0086] Performing gain clarity processing on the linear voice stream data after noise reduction processing to obtain the linear voice stream data after gain clarity processing; the linear voice stream data after gain clarity processing includes the first linear voice stream data after gain clarity processing and the second linear voice stream data after gain clarity processing;
[0087] The synthesis algorithm uses a first channel as first linear voice stream data and a second channel as second linear voice stream data to synthesize dual-channel recording data, including:
[0088] Through a synthesis algorithm, the two-channel recording data is synthesized in the form of a first channel being first linear voice stream data processed for gain clarity and a second channel being second linear voice stream data processed for gain clarity.
[0089] In the disclosed embodiment, considering that the normal conversation sound has a decibel range, such as 0 to 25 decibels, people can communicate clearly at this decibel level without feeling uncomfortable or hearing loss. Therefore, in order to ensure the quality of the recording file, gain clarity processing is required. Exemplarily, the linear voice stream data after noise reduction processing can be subjected to gain clarity processing to obtain the linear voice stream data after gain clarity processing, including the first linear voice stream data after gain clarity processing and the second linear voice stream data after gain clarity processing. As a specific example, the amplitude of the voice of the agent and the user can be detected by the recording engine program, and the gain coefficient can be dynamically adjusted to improve the clarity of the voice of the agent and the user in the voice stream. Among them, signal detection: the audio data is detected, and the gain factor is automatically adjusted according to the volume to be adjusted. Gain adjustment: the gain factor is used for sound gain: the audio sample value after gain = the original audio sample value × gain factor" to calculate the gain value of each audio sample. Thereby, the quality of the dual-channel recording file can be further improved.
[0090] In some possible implementations, after the first voice stream data and the second voice stream data are respectively processed into linear voice stream data in PCM format, the method further includes:
[0091] The linear voice stream data in PCM format is unified into voice stream data in PCMA format by using an A-law encoding algorithm; the voice stream data in PCMA format includes voice stream data in first PCMA format of a first user and voice stream data in second PCMA format of a second user;
[0092] The synthesis algorithm uses a first channel as first linear voice stream data and a second channel as second linear voice stream data to synthesize dual-channel recording data, including:
[0093] The dual-channel recording data is synthesized by a synthesis algorithm in the form of voice stream data in a first PCMA format for the first channel and voice stream data in a second PCMA format for the second channel.
[0094] In the disclosed embodiment, considering that the PCM linear voice stream data occupies a relatively large amount of memory, in order to reduce the memory usage, the linear voice stream data in PCM format can be converted into voice stream data in PCMA format. Exemplarily, the linear voice stream data in PCM format can be unified into voice stream data in PCMA format through an A-law encoding algorithm, including the first PCMA format voice stream data of the first user and the second PCMA format voice stream data of the second user. Correspondingly, the dual-channel recording data can be synthesized through a synthesis algorithm in the form of voice stream data in the first PCMA format for the first channel and voice stream data in the second PCMA format for the second channel. In this way, the memory usage can be reduced while achieving dual-channel recording.
[0095] In some possible implementations, the first user and the second user are respectively a seat staff and a user talking to the seat staff; the first channel and the second channel are respectively a left channel and a right channel;
[0096] The recording method also includes:
[0097] Stores two-channel recording data.
[0098] In the disclosed embodiment, recording files can also be stored. Exemplarily, the recording engine program can support the recording transfer function: support recording to other locations, including other local disks, other local server disks, cloud server disks and other different environments. While freeing up local disk space, the recording can also be flexibly copied for other subsequent operations.
[0099] In order to make the recording method provided by the embodiment of the present disclosure clearer, a specific example is provided below with reference to the accompanying drawings.
[0100] Combination Figure 3 , the call center can forward the call voice streams between the agent and the user, and use the recording engine program to synthesize the two-channel recording and save it to the storage server. RTP (Real-time Transport Protocol) is a network transmission protocol, mainly used to transmit multimedia data such as audio and video on the Internet.
[0101] The binaural recording synthesis process can be as follows Figure 4 As shown. Specifically:
[0102] 1. Voice stream storage.
[0103] After the call is established, the recording engine program binds the server port to interact with the agent and the user, and determines the real-time voice stream data of the agent and the user based on the SSRC identifier of the voice stream, the source IP and port of the voice stream. Based on the timestamp, the voice stream is discarded or supplemented, and the voice streams of the agent and the user are stored linearly in chronological order. The voice stream interaction process is as follows: Figure 5 The voice stream data is transmitted according to the RTP protocol. The RTP packet header structure is as follows: Figure 6 As shown. Among them:
[0104] 1) V: RTP protocol version number, occupies 2 digits, the current protocol version number is 2
[0105] 2) P: padding flag, occupies 1 bit. If P = 1, one or more extra octets are filled at the end of the message. They are not part of the payload.
[0106] 3) X: extension flag, occupies 1 bit. If X=1, an extension header follows the RTP header.
[0107] 4) CC: CSRC counter, occupies 4 bits, indicating the number of CSRC identifiers
[0108] 5) M: Flag, occupies 1 bit, has different meanings for different payloads. For video, it marks the end of a frame; for audio, it marks the beginning of a session.
[0109] 6) PT (payload type): Payload type, occupies 7 bits, and is used to describe the type of payload in the RTP message, such as GSM audio, JPEM image, etc. In streaming media, it is mostly used to distinguish audio streams from video streams, which makes it easier for the client to parse.
[0110] 7) Sequence number: occupies 16 bits, used to identify the sequence number of the RTP message sent by the sender. The sequence number increases by 1 for each message sent. When the underlying bearer protocol uses UDP, this field can be used to check packet loss when the network condition is bad. It can be used to reorder data when network jitter occurs. The initial value of the sequence number is random, and the sequence of audio packets and video packets is counted separately.
[0111] 8) Timestamp: occupies 32 bits and must use a 90kHZ clock frequency (90000 in the program). The timestamp reflects the sampling time of the first octet of the RTP message. The receiver uses the timestamp to calculate delay and delay jitter and perform synchronization control. The timing of the data packet can be obtained based on the timestamp of the RTP packet.
[0112] 9) Synchronous Source (SSRC) Identifier: 32 bits, used to identify the synchronization source. The synchronization source refers to the source that generates the media stream. It is identified by a 32-bit SSRC identifier in the RTP header, and does not rely on the network address. The receiver will distinguish different sources based on the SSRC identifier and group the RTP message.
[0113] 10) Provided Source (CSRC) Identifier: Each CSRC identifier occupies 32 bits, and there can be 0 to 15 CSRCs. Each CSRC identifies all provided sources contained in the RTP message payload. Provided sources are used to identify the source of all RTP packets that contribute to a new packet generated by an RTP mixer. It means that when the mixer receives RTP messages from one or more synchronous sources, it generates a new combined RTP message after mixing, and uses the mixer as the SSRC of the combined RTP message, and transmits all the original SSRCs to the receiver as CSRC, so that the receiver knows the various SSRCs that make up the combined message.
[0114] 2. Decode the voice stream data.
[0115] like Figure 7 As shown in the figure, due to the network environment, the requirements of third-party interactive devices, etc., the voice stream may be interacted in the format of G729, G711A, G711U, etc. The recording engine program supports decoding voice streams of different formats into PCM linear voice streams to facilitate subsequent operations. Among them:
[0116] G729: The core of G729 coding lies in its use of advanced signal processing technology, including Continuous Variable Slope Delta Modulation (CVD), Codebook Excited Linear Prediction (CELP) and Adaptive Differential Pulse Code Modulation (ADPCM). The combination of these technologies enables G729 to convert the original analog voice signal into digital form and transmit it at a rate of 8 kilobits per second (kbps), which significantly reduces bandwidth consumption compared to the 64kbps of traditional PCM coding (such as G.711). It has the advantages of low bit rate, high quality and low latency.
[0117] G711A: By sampling, quantizing and encoding analog voice signals, it is converted into digital signals for transmission or storage. In PCMA, the A-law compression characteristics are used to quantize the voice signals to adapt to the auditory characteristics of the human ear, thereby improving the coding efficiency and subjective hearing of the voice. Europe prefers to use this format for transmission.
[0118] G711U: Uses μ-law compression to convert analog voice signals into digital signals. This conversion process includes three main steps: sampling, quantization, and encoding. Sampling is the conversion of continuous analog voice signals into discrete sample values, quantization is the conversion of these sample values into digital representations, and encoding is the conversion of these digital values into a format suitable for transmission or storage. This format is commonly used for voice transmission in North America.
[0119] PCM linear voice stream: that is, pulse code modulation. The digital value of the voice stream directly represents the amplitude of the signal, and can directly perform noise reduction, gain and other processing on the voice.
[0120] 3. Eliminate noise.
[0121] In the process of voice transmission, various noises such as background sound and current sound are inevitable. The recording engine program will perform voice analysis on the voice stream, make noise spectrum, calculate Gain value, process the voice, and eliminate unnecessary noise. Figure 8 As shown, including:
[0122] Make noise spectrum: record the spectral characteristics of noise according to the voice stream signal. Calculate Gain value: use Wiener filter algorithm to calculate Gain value according to the noise spectrum, voice presence change and signal-to-noise ratio. Noise reduction processing: filter out the noise in the frequency domain noisy signal according to Gain value.
[0123] 4. Gain clarity.
[0124] 20 to 25 decibels is the normal range of conversation sound. People can communicate clearly at this decibel level without feeling uncomfortable or hearing loss. The recording engine program detects the amplitude of the agent and user's voice and dynamically adjusts the gain factor to improve the clarity of the agent and user's voice in the voice stream. Fig. 9 As shown, including:
[0125] Signal detection: Detect the audio data and automatically adjust the gain factor according to the volume to be adjusted. Gain adjustment: Use the gain factor to perform sound gain: the audio sample value after gain = the original audio sample value × gain factor to calculate the gain value of each audio sample.
[0126] 5. Encode the voice stream.
[0127] Combination Fig.10 , the processed PCM linear voice stream is uniformly encoded into a PCMA format voice stream through the A-law encoding algorithm to reduce memory usage.
[0128] 6. Generate recordings
[0129] like Fig.11Through the synthesis algorithm, the encoded PCMA voice stream is synthesized into a two-channel recording in the form of left-channel agent voice and right-channel user voice. It not only fully records the call process between the agent and the user, but also supports independent listening to the call content of the agent and the user, providing data support for agent assessment, AI intelligent quality inspection and other needs.
[0130] Through the above process, at least the following technical problems can be solved:
[0131] 1. Recording transcription: Two-channel recording files can be transcribed into a dialogue format, such as Fig.12 shown.
[0132] 2. Intelligent quality inspection: With dual-channel recording, the quality inspection of call centers has entered the era of intelligent quality inspection from the original manual quality inspection. The intelligent quality inspection system automatically recognizes the voice of customers and agents through dual-channel voice files, and then conducts effective quality inspection on the content, attitude, professionalism and other aspects of the agent's answer, and automatically gives a quality inspection score, which greatly improves the efficiency of quality inspection and reduces labor costs.
[0133] 3. Intelligent assistance: Through dual-channel voice, the call center system can automatically translate the voice of both parties into text during the call between the agent and the customer, and display it to the agent in the form of text dialogue. At the same time, with the help of the knowledge base, it automatically gives matching answers to assist the agent for reference. This can effectively solve the problem of novice agents' lack of business proficiency.
[0134] The specific implementation and technical effects of each step of this embodiment are similar to those of the above method embodiments, and will not be repeated here.
[0135] Based on the same inventive concept, the present disclosure also provides a recording device. Fig.13 As shown, the recording device 1300 includes:
[0136] The data acquisition module 1310 is used to acquire first voice stream data of a first user and second voice stream data of a second user; wherein the first user and the second user are the two parties of the call in the recording;
[0137] The data processing module 1320 is used to process the first voice stream data and the second voice stream data into linear voice stream data in PCM format respectively; wherein the linear voice stream data includes first linear voice stream data of the first user and second linear voice stream data of the second user;
[0138] The recording synthesis module 1330 is used to synthesize the two-channel recording data by using a synthesis algorithm in the form of the first channel being the first linear voice stream data and the second channel being the second linear voice stream data.
[0139] In a possible implementation, the data acquisition module 1310 is used to:
[0140] Acquire transmission parameters of voice stream data; the transmission parameters include SSRC identifier, source IP and port, and timestamp;
[0141] Determine first voice stream data of the first user and second voice stream data of the second user according to the SSRC identifier, source IP and port of the voice stream data;
[0142] The first voice stream data and the second voice stream data are stored in chronological order according to the timestamps of the voice stream data.
[0143] In a possible implementation manner, the recording device 1300 further includes:
[0144] A noise reduction module, used for performing noise reduction processing on the linear voice stream data to obtain the linear voice stream data after noise reduction processing; the linear voice stream data after noise reduction processing includes the first linear voice stream data after noise reduction processing and the second linear voice stream data after noise reduction processing;
[0145] The recording synthesis module 1330 is used to:
[0146] Through a synthesis algorithm, the two-channel recording data is synthesized in the form of the first channel being the first linear voice stream data after the noise reduction processing and the second channel being the second linear voice stream data after the noise reduction processing.
[0147] In a possible implementation manner, the recording device 1300 further includes:
[0148] A gain module, used for performing gain clarity processing on the linear voice stream data after the noise reduction processing to obtain the linear voice stream data after the gain clarity processing; the linear voice stream data after the gain clarity processing includes the first linear voice stream data after the gain clarity processing and the second linear voice stream data after the gain clarity processing;
[0149] The recording synthesis module 1330 is used to:
[0150] Through a synthesis algorithm, the two-channel recording data is synthesized in the form of the first channel being the first linear voice stream data after the gain clarity processing and the second channel being the second linear voice stream data after the gain clarity processing.
[0151] In a possible implementation manner, the recording device 1300 further includes:
[0152] A coding module, used for unifying the linear voice stream data in PCM format into voice stream data in PCMA format by using an A-law coding algorithm; the voice stream data in PCMA format includes voice stream data in a first PCMA format of the first user and voice stream data in a second PCMA format of the second user;
[0153] The recording synthesis module 1330 is used to:
[0154] The dual-channel recording data is synthesized by a synthesis algorithm in the form of the first channel being the voice stream data in the first PCMA format and the second channel being the voice stream data in the second PCMA format.
[0155] In a possible implementation manner, the first user and the second user are respectively an agent and a user talking to the agent; the first channel and the second channel are respectively a left channel and a right channel;
[0156] The recording device 1300 further includes:
[0157] A storage module is used to store the two-channel recording data.
[0158] The specific implementation method and technical effect of the device provided in the embodiment of the present disclosure are similar to those of the above-mentioned method embodiment, and will not be repeated here.
[0159] According to an embodiment of the present disclosure, the present disclosure also discloses an electronic device, a computer-readable storage medium, and a computer program product.
[0160] Fig.14 A schematic block diagram of an example electronic device 1400 that can be used to implement an embodiment of the present disclosure is shown. The electronic device 1400 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0161] like Fig.14As shown, the electronic device 1400 includes a computing unit 1401, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1402 or a computer program loaded from a storage unit 1408 into a random access memory (RAM) 1403. In the RAM 1403, various programs and data required for the operation of the device 1400 can also be stored. The computing unit 1401, the ROM 1402, and the RAM 1403 are connected to each other via a bus 1404. An input / output (I / O) interface 1405 is also connected to the bus 1404.
[0162] Multiple components in the electronic device 1400 are connected to the I / O interface 1405, including: an input unit 1406, such as a keyboard, a mouse, etc.; an output unit 1407, such as various types of displays, speakers, etc.; a storage unit 1408, such as a disk, an optical disk, etc.; and a communication unit 1409, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1409 allows the electronic device 1400 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0163] The computing unit 1401 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1401 performs the various methods and processes described above, such as the recording method. For example, in some embodiments, the recording method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 1408. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 1400 via the ROM 1402 and / or the communication unit 1409. When the computer program is loaded into the RAM 1403 and executed by the computing unit 1401, one or more steps of the recording method described above may be performed. Alternatively, in other embodiments, the computing unit 1401 may be configured to perform the recording method in any other appropriate manner (e.g., by means of firmware).
[0164] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0165] The program code of the computer program product for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0166] In the context of the present disclosure, a computer-readable storage medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may be a machine-readable signal medium or a machine-readable storage medium. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a computer-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0167] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0168] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.
[0169] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.
[0170] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0171] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A recording method, characterized in that: include: Acquire first voice stream data of a first user and second voice stream data of a second user; wherein the first user and the second user are the two parties of the call in the recording; Processing the first voice stream data and the second voice stream data into linear voice stream data in PCM format respectively; wherein the linear voice stream data includes first linear voice stream data of the first user and second linear voice stream data of the second user; Through a synthesis algorithm, the two-channel recording data is synthesized in the form of the first channel being the first linear voice stream data and the second channel being the second linear voice stream data.
2. The recording method according to claim 1, characterized in that: The acquiring of the first voice stream data of the first user and the voice stream data of the second user comprises: Acquire transmission parameters of voice stream data; the transmission parameters include SSRC identifier, source IP and port, and timestamp; Determine first voice stream data of the first user and second voice stream data of the second user according to the SSRC identifier, source IP and port of the voice stream data; The first voice stream data and the second voice stream data are stored in chronological order according to the timestamps of the voice stream data.
3. The recording method according to claim 1, characterized in that: After the first voice stream data and the second voice stream data are processed into linear voice stream data in PCM format respectively, the method further includes: Performing noise reduction processing on the linear voice stream data to obtain noise-reduced linear voice stream data; the noise-reduced linear voice stream data includes first noise-reduced linear voice stream data and second noise-reduced linear voice stream data; The method of synthesizing the two-channel recording data by using a synthesis algorithm in a form where the first channel is the first linear voice stream data and the second channel is the second linear voice stream data includes: Through a synthesis algorithm, the two-channel recording data is synthesized in the form of the first channel being the first linear voice stream data after the noise reduction processing and the second channel being the second linear voice stream data after the noise reduction processing.
4. The recording method according to claim 1, characterized in that: After obtaining the linear speech stream data after the noise reduction processing, the method further includes: Performing gain clarity processing on the linear voice stream data after the noise reduction processing to obtain the linear voice stream data after the gain clarity processing; the linear voice stream data after the gain clarity processing includes the first linear voice stream data after the gain clarity processing and the second linear voice stream data after the gain clarity processing; The method of synthesizing the two-channel recording data by using a synthesis algorithm in a form where the first channel is the first linear voice stream data and the second channel is the second linear voice stream data includes: Through a synthesis algorithm, the two-channel recording data is synthesized in the form of the first channel being the first linear voice stream data after the gain clarity processing and the second channel being the second linear voice stream data after the gain clarity processing.
5. The recording method according to claim 1, characterized in that: After the first voice stream data and the second voice stream data are processed into linear voice stream data in PCM format respectively, the method further includes: The linear voice stream data in PCM format is unified into voice stream data in PCMA format by using an A-law encoding algorithm; the voice stream data in PCMA format includes voice stream data in first PCMA format of the first user and voice stream data in second PCMA format of the second user; The method of synthesizing the two-channel recording data by using a synthesis algorithm in a form where the first channel is the first linear voice stream data and the second channel is the second linear voice stream data includes: The dual-channel recording data is synthesized by a synthesis algorithm in the form of the first channel being the voice stream data in the first PCMA format and the second channel being the voice stream data in the second PCMA format.
6. The recording method according to any one of claims 1 to 5, characterized in that: The first user and the second user are respectively an agent and a user talking to the agent; The first channel and the second channel are respectively a left channel and a right channel; The recording method further comprises: The two-channel recording data is stored.
7. A recording device, characterized in that: include: A data acquisition module, used to acquire first voice stream data of a first user and second voice stream data of a second user; wherein the first user and the second user are the two parties of the call in the recording; A data processing module, used for processing the first voice stream data and the second voice stream data into linear voice stream data in PCM format respectively; wherein the linear voice stream data includes first linear voice stream data of the first user and second linear voice stream data of the second user; The recording synthesis module is used to synthesize dual-channel recording data through a synthesis algorithm in the form of the first channel being the first linear voice stream data and the second channel being the second linear voice stream data.
8. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.