Audio processing method and device of recorder

文档序号:738888 发布日期:2021-04-20 浏览:14次 中文

阅读说明:本技术 一种记录仪的音频处理方法和装置 (Audio processing method and device of recorder ) 是由 郑伟波 徐本凤 胡婷婷 于 2019-10-17 设计创作,主要内容包括:本申请公开了一种记录仪的音频处理方法,包括:在进行本地录音或录像时,记录仪按照第一采样率,获取相应的音频数据源;所述第一采样率大于等于48k;如果当前仅进行本地录音或录像业务,则对所述音频数据源进行编码并保存结果;如果当前同时进行视频回传业务和本地录音或录像业务,则在对所述音频数据源进行编码并保存结果的同时,根据所述音频数据源的拷贝,按照所述视频回传业务使用的采样率进行重采样,将重采样得到的音频数据编码后发送给相应的对端设备。应用本申请公开的技术方案,能够有效解决本地录音录像和视频回传并发时本地录制的视频中语音不够清晰的问题。(The application discloses an audio processing method of a recorder, which comprises the following steps: when local recording or video recording is carried out, the recorder acquires a corresponding audio data source according to a first sampling rate; the first sampling rate is greater than or equal to 48 k; if only local audio recording or video recording service is currently carried out, encoding the audio data source and storing the result; if the video return service and the local recording or video recording service are currently carried out simultaneously, the audio data source is coded and the result is stored, meanwhile, resampling is carried out according to the sampling rate used by the video return service and the audio data obtained by resampling is coded and then sent to corresponding opposite terminal equipment according to the copy of the audio data source. By applying the technical scheme disclosed by the application, the problem that the voice in the locally recorded video is not clear enough when the local recording and video recording and the video return are concurrent can be effectively solved.)

1. An audio processing method for a recorder, comprising:

when local recording or video recording is carried out, the recorder acquires a corresponding audio data source according to a first sampling rate; the first sampling rate is greater than or equal to 48 k;

if only local audio recording or video recording service is currently carried out, encoding the audio data source and storing the result;

if the video return service and the local recording or video recording service are currently carried out simultaneously, the audio data source is coded and the result is stored, meanwhile, resampling is carried out according to the sampling rate used by the video return service and the audio data obtained by resampling is coded and then sent to corresponding opposite terminal equipment according to the copy of the audio data source.

2. The method of claim 1, wherein: the first sampling rate is 48 k.

3. The method of claim 1, wherein: the method further comprises:

the recorder adopts a voice type according to the video return service to determine the sampling rate used by the video return service; the voice types include wideband voice and narrowband voice.

4. An audio processing apparatus of a recorder, provided in the recorder, comprising: a processor to:

when local recording or video recording is carried out, a corresponding audio data source is obtained according to a first sampling rate; the first sampling rate is greater than or equal to 48 k;

if only local audio recording or video recording service is currently carried out, encoding the audio data source and storing the result;

if the video return service and the local recording or video recording service are currently carried out simultaneously, the audio data source is coded and the result is stored, meanwhile, resampling is carried out according to the sampling rate used by the video return service and the audio data obtained by resampling is coded and then sent to corresponding opposite terminal equipment according to the copy of the audio data source.

5. The apparatus of claim 4, wherein the first sampling rate is 48 k.

6. The apparatus of claim 4, wherein the processor is further to:

determining a sampling rate used by the video return service according to the voice type adopted by the video return service; the voice types include wideband voice and narrowband voice.

7. A non-transitory computer readable storage medium storing instructions which, when executed by a processor, cause the processor to perform the steps of the audio processing method of any of claims 1 to 3.

8. An electronic device comprising the non-volatile computer-readable storage medium of claim 7, and the processor having access to the non-volatile computer-readable storage medium.

Technical Field

The present application relates to the field of computer application technologies, and in particular, to an audio processing method and apparatus for a recorder.

Background

At present, a 48k sampling rate is generally adopted when a recorder is used for local recording, so that the recorded voice is clear and rich.

The inventor discovers that in the process of implementing the application: when the recorder simultaneously performs two services of local recording and video return, namely when the local recording and video recording is performed and the corresponding video needs to be returned to the opposite end of the network side, the video recorded locally by the recorder has the problem of unclear voice.

Disclosure of Invention

The application provides an audio processing method and device of a recorder, which can effectively solve the problem that voice in a locally recorded video is not clear enough when the local recording and video recording and the video return are concurrent.

An audio processing method of a recorder, comprising:

when local recording or video recording is carried out, the recorder acquires a corresponding audio data source according to a first sampling rate; the first sampling rate is greater than or equal to 48 k;

if only local audio recording or video recording service is currently carried out, encoding the audio data source and storing the result;

if the video return service and the local recording or video recording service are currently carried out simultaneously, the audio data source is coded and the result is stored, meanwhile, resampling is carried out according to the sampling rate used by the video return service and the audio data obtained by resampling is coded and then sent to corresponding opposite terminal equipment according to the copy of the audio data source.

Preferably, the first sampling rate is 48 k.

Preferably, the method further comprises:

the recorder adopts a voice type according to the video return service to determine the sampling rate used by the video return service; the voice types include wideband voice and narrowband voice.

An audio processing apparatus of a recorder, provided in the recorder, comprising: a processor to:

when local recording or video recording is carried out, a corresponding audio data source is obtained according to a first sampling rate; the first sampling rate is greater than or equal to 48 k;

if only local audio recording or video recording service is currently carried out, encoding the audio data source and storing the result;

if the video return service and the local recording or video recording service are currently carried out simultaneously, the audio data source is coded and the result is stored, meanwhile, resampling is carried out according to the sampling rate used by the video return service and the audio data obtained by resampling is coded and then sent to corresponding opposite terminal equipment according to the copy of the audio data source.

Preferably, the first sampling rate is 48 k.

Preferably, the processor is further configured to:

determining a sampling rate used by the video return service according to the voice type adopted by the video return service; the voice types include wideband voice and narrowband voice.

The present application also discloses a non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to perform the steps of the audio processing method of a recorder as previously described.

The application also discloses an electronic device comprising the non-volatile computer-readable storage medium as described above, and the processor having access to the non-volatile computer-readable storage medium.

According to the technical scheme, when local recording or video recording is carried out, the audio processing method and the audio processing device of the recorder adopt a higher sampling rate to sample, if video return service is carried out at the same time, the audio data source obtained under the high sampling rate needs to be copied, resampling is carried out according to the sampling rate used by the video return service, and the audio data obtained by resampling is coded and then sent to corresponding opposite-end equipment.

Drawings

FIG. 1 is a schematic flow chart of a method according to an embodiment of the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is further described in detail below by referring to the accompanying drawings and examples.

After the inventor carefully analyzes the service implementation scheme of the existing recorder, the inventor finds out that when the recorder simultaneously carries out two services of local recording and video return, the reason that the voice of the video locally recorded by the recorder is not clear enough is as follows:

when the recorder performs two services of local recording and video return at the same time, the video return needs to be performed, and the sampling rate of 8k or 16k is adopted, so that the recorded voice is not clear and rich enough.

Based on the above analysis, the present application considers that 48k of sampling rate is adopted for video recording to ensure that recorded voice is clear and rich, and when two services of local recording and video return are performed concurrently, in order to facilitate video return, the recorded video needs to be copied, and then the copied video is resampled according to the sampling rate of video return to be supplied for video return.

Fig. 1 is a schematic flow chart of an audio processing method of a recorder according to an embodiment of the present invention, as shown in fig. 1, the method includes:

step 101, when local recording or video recording is performed, the recorder acquires a corresponding audio data source according to a first sampling rate. The first sampling rate is equal to or greater than 48 k.

In this step, different from the existing scheme, when local recording or video recording is performed, whether a video return service is performed simultaneously is not distinguished, and an audio data source is obtained at a high sampling rate, so that recorded voices are clear and rich under any condition.

In practical applications, a person skilled in the art can set the first sampling rate according to actual needs as long as the recorded voice is clear and rich.

Preferably, in order to improve the compatibility of the present application, the first sampling rate may be set to 48 k.

102, if only local audio recording or video recording service is currently carried out, encoding the audio data source and storing a result;

if the video return service and the local recording or video recording service are currently carried out simultaneously, the audio data source is coded and the result is stored, meanwhile, resampling is carried out according to the sampling rate used by the video return service and the audio data obtained by resampling is coded and then sent to corresponding opposite terminal equipment according to the copy of the audio data source.

In this step, when the video backhaul service and the local recording or video recording service are concurrently performed, it is necessary to perform resampling according to the sampling rate used by the video backhaul service and the copy of the audio data source while encoding the audio data source and storing the result, and encode and transmit the resampled audio data to the corresponding peer device. Therefore, on one hand, the problem that the voice in the locally recorded video is not clear enough when the local recording and video recording and the video return are concurrent can be effectively solved, and on the other hand, the network transmission requirement of the video return service can be met.

Preferably, the recorder may determine the sampling rate used by the video backhaul service according to whether the video backhaul service adopts a voice type, that is, a wideband voice or a narrowband voice. And if the voice is the broadband voice, determining the sampling rate used by the video back-transfer service as the sampling rate required by the broadband voice, and if the voice is the narrowband voice, determining the sampling rate used by the video back-transfer service as the sampling rate required by the narrowband voice.

Corresponding to the above method, an embodiment of the present application further provides an audio processing device of a recorder, where the device is disposed in the recorder, and includes: a processor to:

when local recording or video recording is carried out, a corresponding audio data source is obtained according to a first sampling rate; the first sampling rate is greater than or equal to 48 k;

if only local audio recording or video recording service is currently carried out, encoding the audio data source and storing the result;

if the video return service and the local recording or video recording service are currently carried out simultaneously, the audio data source is coded and the result is stored, meanwhile, resampling is carried out according to the sampling rate used by the video return service and the audio data obtained by resampling is coded and then sent to corresponding opposite terminal equipment according to the copy of the audio data source.

Preferably, the first sampling rate is 48 k.

Preferably, the processor is further configured to:

determining a sampling rate used by the video return service according to the voice type adopted by the video return service; the voice types include wideband voice and narrowband voice.

Furthermore, the present application also provides a non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to perform the steps of the audio processing method of a recorder as described above.

Further, the present application provides an electronic device comprising the non-volatile computer-readable storage medium as described above, and the processor having access to the non-volatile computer-readable storage medium.

The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

6页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种产品图像数据管理方法、装置、设备及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类