Voice broadcasting method, device, equipment and storage medium

文档序号:1339659 发布日期:2020-07-17 浏览:12次 中文

阅读说明:本技术 一种语音播报方法、装置、设备及存储介质 (Voice broadcasting method, device, equipment and storage medium ) 是由 林浩 于 2020-03-23 设计创作,主要内容包括:本发明实施例公开了一种语音播报方法、装置、设备及存储介质。该方法应用于移动终端和/或车载终端系统,包括:获取目标待播报文字信息及对应的播报模式;监测到终端支持选定语言的语音播报时,调用语音播报库按照所述播报模式对所述目标待播报文字信息进行语音播报。通过终端系统自带的语音播报功能对目标待播报文字信息进行选定语言的语音播放,实现了在不安装第三方应用的情况下对文字转化成语音进行播报,节约了使用第三方应用所花费的成本,并且不需要第三方应用降低了安装第三方应用时对内存的占用率。(The embodiment of the invention discloses a voice broadcasting method, a voice broadcasting device, voice broadcasting equipment and a storage medium. The method is applied to a mobile terminal and/or a vehicle-mounted terminal system, and comprises the following steps: acquiring target text information to be broadcasted and a corresponding broadcasting mode; and when the terminal is monitored to support voice broadcasting of the selected language, calling a voice broadcasting library to carry out voice broadcasting on the target to-be-broadcasted text information according to the broadcasting mode. The voice broadcasting function of the terminal system is used for carrying out voice broadcasting of the selected language on the target to-be-broadcasted text information, so that the text is converted into voice to be broadcasted under the condition that the third party application is not installed, the cost spent on using the third party application is saved, and the occupation rate of the memory when the third party application is installed is reduced without the third party application.)

1. A voice broadcasting method is applied to a mobile terminal and/or a vehicle-mounted terminal system, and is characterized by comprising the following steps:

acquiring target text information to be broadcasted and a corresponding broadcasting mode;

and when the terminal is monitored to support voice broadcasting of the selected language, calling a voice broadcasting library to carry out voice broadcasting on the target to-be-broadcasted text information according to the broadcasting mode.

2. The method according to claim 1, wherein before the obtaining the target text information to be broadcasted and the corresponding broadcasting mode, the method further comprises:

initializing a voice broadcast library in the terminal system, and starting a voice broadcast function based on the terminal system when the terminal system supports voice broadcast.

3. The method according to claim 2, wherein the calling a voice broadcast library to perform voice broadcast on the target text information to be broadcast according to the broadcast mode comprises:

when the broadcasting mode is a sequential broadcasting mode, putting the target to-be-broadcasted character information into a pre-established to-be-broadcasted queue, and calling a voice broadcasting library to perform voice broadcasting on the target to-be-broadcasted character information after the target to-be-broadcasted character information is selected according to a first-in first-out rule;

when the broadcasting mode is an inserting and continuing broadcasting mode, controlling the voice broadcasting system to broadcast according to inserting and continuing broadcasting rules;

and when the broadcasting mode is the insertion broadcasting mode, controlling the voice broadcasting system to broadcast according to an insertion broadcasting rule.

4. The method of claim 3, wherein the controlling the voice broadcast system to broadcast according to the rule of inserting and continuing broadcast comprises:

interrupting the current voice broadcast, and directly calling a voice broadcast library to carry out voice broadcast on the target text information to be broadcast;

if new text information to be broadcasted is received in the process of carrying out voice broadcasting on the target text information to be broadcasted, adding the new text information to be broadcasted into a pre-established broadcasting queue;

and after the target to-be-broadcasted character information is subjected to voice broadcasting, selecting the to-be-broadcasted character information as the next to-be-broadcasted character information from the broadcasting queue or the to-be-broadcasted queue.

5. The method according to claim 3, wherein the controlling the voice broadcast system to broadcast according to the broadcast insertion rule comprises:

interrupting the current voice broadcasting and clearing the created queue to be broadcasted and the queue being broadcasted;

calling a voice broadcast library to carry out voice broadcast on the target text information to be broadcast, and adding new text information to be broadcast into a queue to be broadcast when receiving the new text information to be broadcast in the voice broadcast process;

the completion is right after the target waits to report the literal information and carries out voice broadcast, it is right to continue to wait to report the existence in the queue and wait to report the literal information and carry out voice broadcast.

6. The method of any one of claims 1-5, further comprising:

before a voice broadcast library is called to carry out voice broadcast on the target text information to be broadcast according to the broadcast mode, when third party voice exists, the volume of the third party voice is adjusted according to a selected volume adjustment rule, wherein the volume adjustment rule comprises the volume of weakening the third party voice or interrupting the third party voice;

and after the voice broadcasting library is called to carry out voice broadcasting on the target to-be-broadcasted text information according to the broadcasting mode, restoring the regulated third party sound in the voice broadcasting process.

7. The method of claim 1, further comprising:

and after the terminal system based voice broadcasting function is quitted, the voice broadcasting object created by the voice broadcasting is cancelled and released.

8. A voice broadcast device, comprising:

the acquisition module is used for acquiring the target text information to be broadcasted and the corresponding broadcasting mode;

and the calling module is used for calling a voice broadcasting library to carry out voice broadcasting on the target to-be-broadcasted text information according to the broadcasting mode when monitoring that the terminal supports voice broadcasting of the selected language.

9. An apparatus, characterized in that the apparatus comprises:

one or more processors;

a storage device for storing one or more programs,

when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement a voice broadcasting method according to any one of claims 1 to 7.

10. A computer-readable storage medium on which a computer program is stored, the program realizing a voice broadcasting method according to any one of claims 1 to 7 when executed by a processor.

Technical Field

The present invention relates to audio processing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for voice broadcasting.

Background

With the improvement of living standard and the standardization of network car booking management, network car booking is more and more popular among people. The taxi appointment driver can determine the position of the passenger by checking the order information of the passenger to determine whether the passenger arrives at the appointed place or not, and therefore the relation between the driver and the passenger can be accurately and conveniently established through the order information. However, there are more and more driving accidents caused by the fact that the net car booking driver checks passenger order information during driving. The online taxi appointment system has the advantages that the online taxi appointment system is more and more popular, people can pay great attention to the safety of driving under the environment that the traveling is more and more convenient, and the driving safety of drivers and passengers is guaranteed to the greatest extent.

At present, the technical scheme of a third party is mostly adopted in the market to realize text-to-speech broadcast, and a well-known three-party library such as science news flys, hundred-degree speech and the like provides a text-to-speech broadcast function for a network car booking driver or a network car booking platform. However, although the technical implementation of the three-party library is complete, the inevitable access cost such as too large bag volume and too high use cost still exists. Therefore, how to effectively utilize the existing official API (application programming Interface) to satisfy the requirement of voice broadcasting without using a third party is urgent.

Disclosure of Invention

The invention provides a voice broadcasting method, a voice broadcasting device, voice broadcasting equipment and a voice broadcasting storage medium, which can realize low-cost text-to-voice conversion.

In a first aspect, an embodiment of the present invention provides a voice broadcast method, which is applied to a mobile terminal and/or a vehicle-mounted terminal system, where the voice broadcast method includes:

acquiring target text information to be broadcasted and a corresponding broadcasting mode;

and when the terminal is monitored to support voice broadcasting of the selected language, calling a voice broadcasting library to carry out voice broadcasting on the target to-be-broadcasted text information according to the broadcasting mode.

In a second aspect, an embodiment of the present invention further provides a voice broadcast device, where the voice broadcast device includes:

the acquisition module is used for acquiring the target text information to be broadcasted and the corresponding broadcasting mode;

and the calling module is used for calling a voice broadcasting library to carry out voice broadcasting on the target to-be-broadcasted text information according to the broadcasting mode when monitoring that the terminal supports voice broadcasting of the selected language.

In a third aspect, an embodiment of the present invention further provides an apparatus, where the apparatus includes:

one or more processors;

a storage device for storing one or more programs,

when the one or more programs are executed by the one or more processors, the one or more processors implement a voice broadcasting method according to any one of the embodiments of the present invention.

In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a voice broadcast method according to any one of the embodiments of the present invention.

The embodiment of the invention provides a voice broadcasting method, a voice broadcasting device, voice broadcasting equipment and a storage medium, wherein the target text information to be broadcasted and a corresponding broadcasting mode are obtained; and when the terminal is monitored to support voice broadcasting of the selected language, calling a voice broadcasting library to carry out voice broadcasting on the target to-be-broadcasted text information according to the broadcasting mode. The voice broadcasting function of the terminal system is used for carrying out voice broadcasting of the selected language on the target to-be-broadcasted text information, so that the text is converted into voice to be broadcasted under the condition that the third party application is not installed, the cost spent on using the third party application is saved, and the occupation rate of the memory when the third party application is installed is reduced without the third party application.

Drawings

Fig. 1 is a flowchart of a voice broadcast method according to a first embodiment of the present invention;

fig. 2 is a flowchart of a voice broadcast method in the second embodiment of the present invention;

fig. 3 is a flowchart of a broadcast method according to an insertion and continuous broadcast rule in the second embodiment of the present invention;

fig. 4 is a flowchart of a broadcast method according to an insert broadcast rule in the second embodiment of the present invention;

fig. 5 is a structural diagram of a voice broadcasting device in a third embodiment of the present invention;

fig. 6 is a schematic structural diagram of an apparatus according to a fourth embodiment of the present invention.

Detailed Description

The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种切割段落音频的方法、系统、装置、介质

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!