Method and apparatus for sending and receiving voice of browser, and voice intercom system
AssigneeHangzhou Hikvision Digital Technology Co., Ltd.
InventorsZhongjian Feng, Xiangzhen Chen, Xiangqing Jin
Life of this patent
Estimating the term…
Abstract
A method and apparatus for voice transmission and reception by a browser and a voice intercom system are provided. The method for voice transmission by a browser includes: collecting first voice data through a built-in audio collection interface of the browser (S101); obtaining a first voice sampling parameter that can be utilized by a target device (S102) to process voice data; sampling the first voice data based on the first voice sampling parameter to obtain target voice data (S103); and transmitting the target voice data to the target device (S104). The method enables a browser to have a function of voice intercom without using a plug-in.
Claims12
A method for voice transmission by a browser, comprising:
- collecting first voice data through a built-in audio collection interface of the browser;
- obtaining a first voice sampling parameter that can be utilized by a target device to process voice data;
- sampling the first voice data based on the first voice sampling parameter to obtain target voice data;
- and
- transmitting the target voice data to the target device;
- wherein, the first voice sampling parameter comprises a first voice sampling accuracy and a first voice sampling frequency;
- and sampling the first voice data based on the first voice sampling parameter to obtain target voice data comprises:
- calculating a ratio between the first voice sampling frequency and a second voice sampling frequency;
- wherein, the second voice sampling frequency is a voice sampling parameter that can be utilized by the built-in audio collection interface of the browser to process voice data;
- and
- sampling the first voice data based on the ratio and the first voice sampling accuracy to obtain the target voice data.
A method for voice reception by a browser, comprising:
- receiving second voice data transmitted by a target device;
- obtaining a first voice sampling parameter that can be utilized by a target device to process voice data;
- encapsulating the second voice data based on the first voice sampling parameter to obtain encapsulated voice data;
- decoding, through a built-in audio decoding interface of the browser, the encapsulated voice data as obtained;
- and
- playing the decoded second voice data;
- wherein, the first voice sampling parameter comprises a first voice sampling accuracy and a first voice sampling frequency;
- encapsulating the second voice data based on the first voice sampling parameter to obtain encapsulated voice data comprises:
- calculating a ratio between the first voice sampling frequency and a second voice sampling frequency;
- wherein, the second voice sampling frequency is a voice sampling parameter that can be utilized by the built-in audio collection interface of the browser to process voice data;
- and
- encapsulating the second voice data based on the ratio and the first voice sampling accuracy to obtain the target voice data.
Dependencies are inferred from the claim text.