# Intonation Characteristics of Singing Based on Artificial Intelligence Technology and Its Application in Song-on-Demand Scoring System

Authors: E. Wei
Journal: Mathematical Problems in Engineering
 (2021)

---

## Abstract

With the continuous progress of my country’s cultural industry, how to apply artificial intelligence technology to song on demand has become an issue of concern. This research mainly discusses the research of singing intonation characteristics based on artificial intelligence technology and its application in song-on-demand scoring system. This paper uses the combination of ant colony algorithm and DTW algorithm to measure the similarity between speech signals with the average distortion distance, so as to expect accurate recognition results. The design of the song-on-demand scoring function module uses a combination of MVC mode and command mode based on artificial intelligence technology. The view component in the MVC mode is mainly used to display the content that the user needs to sing and realize the interaction with the user. The singer selects a song to start playing, and the scoring terminal device queries the music library server for song information according to the song number, then starts playing the song through the FTP file sharing service according to the audio file path in the song information, and at the same time displays the song on the display according to the timeline Show song and pitch information. The singer sings according to the screen prompts. The microphone collects the voice signal and transmits it to the scoring terminal. After the scoring algorithm is calculated, the result is fed back to the screen in real time. The singer can view his singing status in real time and make corresponding adjustments to obtain a higher score. After the singing, the scoring terminal will display the final result on the screen to inform the user and upload the singing record to the server for recording. In the tested on-demand retrieval engine, the average hit rate of the top 3 has reached more than 90% under various humming methods, basically maintaining the high hit rate characteristics of the original retrieval engine. The system designed in this research helps to effectively improve the singing level.


---

## Body

## 1. Introduction

With the technological development of hardware and software equipment, the ability and superiority of artificial intelligence have quickly penetrated into all areas of life, and of course, it has become the hottest vocabulary in the field of music technology [1]. We know that the promotion of music is actually based on technological changes. Without the invention of tools, there would be no musical instruments; without the emergence of electronic technology, there would be no electronic music [2]. Therefore, artificial intelligence, a major technology, can bring much change to music. The generation of artificial intelligence arrangement is an interdisciplinary field. It requires researchers to master much interdisciplinary knowledge, including music production, music technology, artificial intelligence, and automatic accompaniment. Because it is a new field, domestic research is still relatively poor.Currently, there are two main algorithms used in the field of algorithmic composition. One is the algorithm of composition based on rules and music knowledge. This kind of method also uses probabilistic methods to improve. The second is the machine learning algorithm, which is one of the hot tools currently applied to algorithmic composition [3]. It can be further divided into traditional machine learning algorithms and artificial neural networks. Traditional machine learning algorithms mainly refer to the kind of machine learning algorithms based on probability theory and statistics. The efforts of the predecessors laid the foundation for the current generation of artificial intelligence music.Artificial intelligence (AI) activities are integrated into the software development process. Kulkarni and Padmanabham used an extended waterfall chart and agile model to model the entire process of software (SW) development. They have integrated important AI activities (such as intelligent agents, machine learning (ML), knowledge representation, statistical models, probabilistic methods, and fuzziness) into the extension. Although the model they studied collects and feeds back data, there is still a lack of effective analysis of the data [4]. Liu et al. believed that although artificial intelligence is currently one of the most interesting areas in scientific research, the potential threat posed by emerging AI systems is still the source of ongoing controversy. In order to solve the problem of AI threats, they proposed a standard intelligence model [5], which unifies AI and human characteristics from the four aspects of knowledge (i.e., input, output, mastery, and creation). Although his research can measure the level of artificial intelligence system, the research method is too cumbersome [6]. Mazinan and Khalaji demonstrated a comparative study of the application of multiple model predictive control schemes based on artificial intelligence. They will control the program that will be implemented on a type of industrial complex system. They focused their results on an industrial tubular heat exchanger system that has such high applicability in practical and academic environments. Although the traditional scheme is almost implemented on the system, his research lacks specific parameters [7]. The Ali study investigated the impact of such machine translation (MT) software and TM tools widely used by the Arab community for its academic and commercial purposes. His research aimed to find whether it is possible to transform the paradigm from Arabic localization to Arabic globalization. Therefore, he studied the content and applications of some machine translation software (such as SYSTRAN and IBM Watson) to determine how to use them without manual intervention and retain the meaning of the original text. Although his research uses the idea of artificial intelligence, the research process lacks statistical data [8].This paper uses the combination of ant colony algorithm and DTW algorithm to measure the similarity between speech signals with the average distortion distance, so as to expect accurate recognition results. The design of the song-on-demand scoring function module uses a combination of MVC mode and command mode based on artificial intelligence technology. The view component in the MVC mode is mainly used to display the content that the user needs to sing and realize the interaction with the user. The singer sings according to the screen prompts. The microphone collects the voice signal and transmits it to the scoring terminal. After the scoring algorithm is calculated, the result is fed back to the screen in real time. The singer can view his singing status in real time and make corresponding adjustments to obtain a higher score. After the singing, the scoring terminal will display the final result on the screen to inform the user and upload the singing record to the server for recording.


## 2. Singing Intonation Characteristics

### 2.1. Artificial Intelligence Technology

At present, there is no optimal solution in the main technology of AI composition, and most of them use hybrid algorithms [9, 10]. In practice, the most advanced deep learning algorithm (artificial neural network) is one of the most important technologies for AI composition. Compared with other algorithms, it has the ability to learn by itself, associative storage, and the ability to find optimal solutions at high speed [11]. This algorithm simulates the principle of neural network transmission in the human brain. Therefore, in this kind of deep learning, programmers need to build a multilayer neural network and program it in a multilayer structure to process the information between input and output points [12, 13]. After the data is input, the artificial neural network will find the laws that exist among many input works, forming an understanding of music [14]. AI will take it to predict the direction of music, and the verification data set will tell it whether the prediction is correct or not, and the correct and wrong feedback will be remembered by AI [15, 16]. After a lot of learning, AI’s predictive ability is getting stronger and stronger, then masters the summarized information, and finally creates [17].


### 2.2. Singing Intonation Characteristics

When performing feature extraction, there will be more or fewer differences in the tone size, strength, and recording of the speaker in different environments, which will cause the extracted feature parameters to be inaccurate, so accurate feature parameter matching cannot be performed, so this paper adopts the interpolation method, linear scaling method, and linear translation method which are used to regularize the feature parameters to ensure the accuracy of the feature parameters that can be extracted [13, 18]. After detecting the end point of the voice signal with a sampling rate of 16 kHz, we find out the starting end of the sound and frame the speech. The frame size is 512 points, about 32 milliseconds, and the frameshift is 170 points, which accounts for about three of a frame one part; assuming that the speech signal in each frame is represented by Snm, the volume intensity curve is defined as(1)avgMagn=1M∑m=0M−1Snm,n=0,1,…,N−1.Even if the same person uses the same volume to record into the microphone, there may still be differences in the volume of the voice signal due to different microphones [15].(2)A¯=avgMag1n=avgMag10⋯avgMag1N−1,B¯=avgMag2n=avgMag20⋯avgMag2N−1.The following results can be learned:(3)θ=B¯TB¯−1B¯TA¯.The fine-tuned test voice volume curve is assumed to beavgMag2n, and its formula is as follows:(4)avgMag2n=B¯θ=avgMag2nθ,n=0,1,…,N−1.The system framework of the pitch extraction scheme is shown in Figure1.Figure 1
Pitch extraction scheme system framework.


### 2.3. Song Evaluation

When the user is using it, first select the song to be sung on the platform control page. This operation is equivalent to issuing a command to the controller, and the controller needs to call the scoring function according to the user’s operation and change the display in the browser [19, 20]. After the user sings according to the changed display, the scoring method will score the user’s singing and return the result to the browser. Such a process constitutes a complete scoring process [21]. In order to accurately evaluate the contour of the curve, the evaluation parameter force of the polyline is introduced, which is mainly used to describe the similarity of the two polylines [22, 23].(5)ηi=lill^,iηi∈0,1.The evaluation parameterηi reflects the similarity between the two points of the straight line and the curve [24]. Suppose that the variable length including angle chain code of the curve is(6)A=α1,α2,,…,αn.Then(7)αij=2arccos∑rHr+1−Hr+2lr+1+lr+2,Among them, αij is the angle sequence [25, 26]. The amplitude-frequency response of each filter is in the shape of a triangle and is equal to the above uniform center frequency and the center frequency is linearly reduced to zero for two adjacent filters [27]. Its relationship with linear frequency conversion is(8)f=2595log101+f100.The power spectrum of the frame signal is obtained by FFT [28]. Extract breath parameters:(9)stdX=1n−1∑i=1nXi−XXi21/2,Among them, n represents the number of sampling points. Use f1x and f2x to represent the gene trajectory of the original singing voice and the imitated voice after feature extraction.(10)f1x=f2x−1N∑k=0N−1f2k+1N∑k=0N−1f1k,f1x=f2x−diff,diff=1N∑k=0N−1f2k+1N∑k=0N−1f1k,Among them, diff represents the difference between the two.(11)Dn+1,m=dn+1,m+minDn,mgn,m,Dn,m−1,Dn,m−2,gn,m=∞wn=wn−10wn≠wn−1,wn represents the optimal time warping function. Although it is very time-consuming to use dynamic programming technology to make time regulation, this method only calculates the matching distance between the original vocal voice and the imitated voice feature parameters, thus simplifying the process of speech recognition, so the ant colony dynamic time planning algorithm is still a more effective speech recognition technology [29].


## 2.1. Artificial Intelligence Technology

At present, there is no optimal solution in the main technology of AI composition, and most of them use hybrid algorithms [9, 10]. In practice, the most advanced deep learning algorithm (artificial neural network) is one of the most important technologies for AI composition. Compared with other algorithms, it has the ability to learn by itself, associative storage, and the ability to find optimal solutions at high speed [11]. This algorithm simulates the principle of neural network transmission in the human brain. Therefore, in this kind of deep learning, programmers need to build a multilayer neural network and program it in a multilayer structure to process the information between input and output points [12, 13]. After the data is input, the artificial neural network will find the laws that exist among many input works, forming an understanding of music [14]. AI will take it to predict the direction of music, and the verification data set will tell it whether the prediction is correct or not, and the correct and wrong feedback will be remembered by AI [15, 16]. After a lot of learning, AI’s predictive ability is getting stronger and stronger, then masters the summarized information, and finally creates [17].


## 2.2. Singing Intonation Characteristics

When performing feature extraction, there will be more or fewer differences in the tone size, strength, and recording of the speaker in different environments, which will cause the extracted feature parameters to be inaccurate, so accurate feature parameter matching cannot be performed, so this paper adopts the interpolation method, linear scaling method, and linear translation method which are used to regularize the feature parameters to ensure the accuracy of the feature parameters that can be extracted [13, 18]. After detecting the end point of the voice signal with a sampling rate of 16 kHz, we find out the starting end of the sound and frame the speech. The frame size is 512 points, about 32 milliseconds, and the frameshift is 170 points, which accounts for about three of a frame one part; assuming that the speech signal in each frame is represented by Snm, the volume intensity curve is defined as(1)avgMagn=1M∑m=0M−1Snm,n=0,1,…,N−1.Even if the same person uses the same volume to record into the microphone, there may still be differences in the volume of the voice signal due to different microphones [15].(2)A¯=avgMag1n=avgMag10⋯avgMag1N−1,B¯=avgMag2n=avgMag20⋯avgMag2N−1.The following results can be learned:(3)θ=B¯TB¯−1B¯TA¯.The fine-tuned test voice volume curve is assumed to beavgMag2n, and its formula is as follows:(4)avgMag2n=B¯θ=avgMag2nθ,n=0,1,…,N−1.The system framework of the pitch extraction scheme is shown in Figure1.Figure 1
Pitch extraction scheme system framework.


## 2.3. Song Evaluation

When the user is using it, first select the song to be sung on the platform control page. This operation is equivalent to issuing a command to the controller, and the controller needs to call the scoring function according to the user’s operation and change the display in the browser [19, 20]. After the user sings according to the changed display, the scoring method will score the user’s singing and return the result to the browser. Such a process constitutes a complete scoring process [21]. In order to accurately evaluate the contour of the curve, the evaluation parameter force of the polyline is introduced, which is mainly used to describe the similarity of the two polylines [22, 23].(5)ηi=lill^,iηi∈0,1.The evaluation parameterηi reflects the similarity between the two points of the straight line and the curve [24]. Suppose that the variable length including angle chain code of the curve is(6)A=α1,α2,,…,αn.Then(7)αij=2arccos∑rHr+1−Hr+2lr+1+lr+2,Among them, αij is the angle sequence [25, 26]. The amplitude-frequency response of each filter is in the shape of a triangle and is equal to the above uniform center frequency and the center frequency is linearly reduced to zero for two adjacent filters [27]. Its relationship with linear frequency conversion is(8)f=2595log101+f100.The power spectrum of the frame signal is obtained by FFT [28]. Extract breath parameters:(9)stdX=1n−1∑i=1nXi−XXi21/2,Among them, n represents the number of sampling points. Use f1x and f2x to represent the gene trajectory of the original singing voice and the imitated voice after feature extraction.(10)f1x=f2x−1N∑k=0N−1f2k+1N∑k=0N−1f1k,f1x=f2x−diff,diff=1N∑k=0N−1f2k+1N∑k=0N−1f1k,Among them, diff represents the difference between the two.(11)Dn+1,m=dn+1,m+minDn,mgn,m,Dn,m−1,Dn,m−2,gn,m=∞wn=wn−10wn≠wn−1,wn represents the optimal time warping function. Although it is very time-consuming to use dynamic programming technology to make time regulation, this method only calculates the matching distance between the original vocal voice and the imitated voice feature parameters, thus simplifying the process of speech recognition, so the ant colony dynamic time planning algorithm is still a more effective speech recognition technology [29].


## 3. Song-on-Demand Scoring System Experiment

### 3.1. Architecture Design of Scoring Function Module

The traditional DTW algorithm minimizes the total weighted distance through a local optimization method. In this paper, the ant colony algorithm is combined with the DTW algorithm, and the average distortion distance is used to measure the similarity between speech signals, so as to expect accurate recognition results. The design of the song-on-demand scoring function module uses a combination of MVC mode and command mode based on artificial intelligence technology. The view component in the MVC mode is composed of a Java browser embedded in a smart client, which is mainly used to display the content that the user needs to sing and realize the interaction with the user. The controller component uses the command mode design method to encapsulate each command in the software control as an object. These objects can respond to different command statements to complete various operations. Model components are various business logics needed in the software running process. In the song-on-demand scoring system, the scoring function constitutes the model components. Many intelligent terminal devices are connected to the song library server through the local area network, and the database administrator also needs to maintain the service through the local area network. Among them, the song library server may be composed of a server group considering the load pressure and data disaster tolerance, but this is transparent to the terminal devices. All terminal devices are connected to the same logical server through IP addresses. The scoring terminal device is responsible for the interactive operation with the user, which is realized through touch screen, display, microphone, and so on. The administrator is mainly responsible for the maintenance of the internal network and database to ensure the smoothness of the network transmission process.Among them, the singer selects a song to start playing, and the scoring terminal device queries the song library server for song information according to the song number, then downloads the audio file from the server through the FTP file sharing service according to the audio file path in the song information and the song score file path with the score file, and starts to play the song; at the same time, the song and pitch information are displayed on the display according to the timeline. The singer sings according to the screen prompts. The microphone collects the voice signal and transmits it to the scoring terminal. After the scoring algorithm is calculated, the result is fed back to the screen in real time. The singer can view his singing status in real time and make corresponding adjustments to obtain a higher score. After the singing, the scoring terminal will display the final result on the screen to inform the user and upload the singing record to the server for recording.


### 3.2. Song Library Establishment

The establishment of the song library directly affects the accuracy of the experimental data and plays a vital role in the entire system. In practice, even if the same person is in the same environment, the signals of the two recorded songs are difficult to be completely consistent and must be recorded multiple times as an imitated song library. The accuracy of the recorded songs in the song library is set to 16 bits, and the sampling frequency is set to 8 kHz. The collection object of the standard song is the original singer, and the recorded song is used as a template song for comparison with the imitated song.


### 3.3. Control Process of the Song-on-Demand Scoring System

The song-on-demand scoring system realizes the scoring function by rewriting the speech recognition module Sphinx4. Through the singing of the singer, the intelligent client in the system controls the speech recognition module. The smart client determines the song paragraph to be evaluated and then passes the song paragraph to the Sphinx4 speech recognition module in the form of parameters. The voice recognition module will start a specific thread for the song paragraph according to the song paragraph to be investigated. This specific thread will monitor the microphone input data. After the singer’s pronunciation is received by the microphone, it will be passed to the voice recognition module, and the voice recognition module will sing according to the song. The speaker’s pronunciation evaluates a score that is similar to the standard pronunciation, this score is returned to the smart client, and the smart client displays this score on the user interface. The smart client is also responsible for the display of relevant information about the song paragraphs to be investigated and records the number of times the singer has practiced and the results. In addition, the user interface also needs to consider the factors of interactive design and provide functions such as singing timing bar to assist users in using the scoring system and improve the effect of user experience.(1)
Query. The administrator enters the song number or song title, and the system transmits the number and song title data to the database through the database query interface. After the database is processed, the song information is returned. The system feeds back the song information to the administrator to display the query result.(2)
Newly Added. The administrator enters all the attribute values of the song information. The system queries the database for the song information according to the song number in it and determines whether the song information already exists according to the database feedback result. If it exists, encapsulate the song information into a database format, transfer it to the database, and send instructions to add new information; otherwise, it will not be processed.(3)
Delete. The administrator enters the song number or song name, and the system transfers the number and song name data to the database through the database query interface and returns the song information after the database is processed. If the song exists, the entry song information is deleted; otherwise, it will not be processed.(4)
Modification. This operation is a combination of query, deletion, and addition. The administrator enters the song information, and the system knows whether the song exists through the query operation. If it does not exist, add the song information entry to the database through the new operation; otherwise, delete the song first through the delete operation information, and then add a new song information entry to the database through a new operation. The control process of the song-on-demand scoring system is shown in Figure 2.Figure 2
The control process of the song-on-demand scoring system.


### 3.4. Front-End Software Level Model of the Song-on-Demand Scoring System

The song-on-demand scoring system described in this paper is composed of server-side components and client-side components. The server-side components use SQL databases, and the program logic structure is relatively simple, without too much hierarchy. The client scoring system can be divided into 3 levels, from bottom to top: platform dependency layer, scoring business layer, and system application layer. Among them, the platform-dependent layer provides the underlying support for the system’s operating resources and provides a guarantee for system portability by providing standard interfaces to shield the differences between system hardware and operating systems. The scoring business layer is the core of the scoring business logic. The business logic including recording cache, network communication, singing interface, and broadcast control is implemented at this level, and the whole is built with MVC architecture. The system application layer mainly refers to the singing system. The scoring system is designed as a business component of the traditional singing system. It has independent business logic, but it is located under the singing system and is an extension of the original system. Therefore, the system application layer is mainly responsible for the user’s singing operation and finally calls the broadcast control interface of the scoring business layer to complete the business logic of singing scoring.


### 3.5. Software Component Design of Song-on-Demand Scoring System

(i)
The background service component is composed of two modules:(1)
Database operation module: it mainly realizes data operation on SQL database, including song information, query, score history, and score ranking query (currently not used by the front-end system).(2)
Network communication module: it mainly realizes client connection management and request-response functions. Since multiple clients may initiate requests to the server at the same time, the request connection time is variable, and the communication time is short, a thread pool is designed in the network communication module to manage each connection request, so as to avoid the continuous creation and destruction of threads. Improve system concurrency performance. The main functions of this module include communication thread scheduling, request analysis, data distribution, and request-reply.(ii)
The front-end business components of the system are relatively complex and consist of four modules:(1)
Network communication module: it mainly realizes the network connection with the server and request sending and receiving. Compared with the server-side network module, the client-side network module is relatively simple and does not require multithreading. The main functions include connection status management, data request sending and receiving, and reply message analysis.(2)
Resource download module: it mainly realizes the download of audio files and song score files and other resources. Its core is the realization of the PP file remote service client. Since the FTP protocol has mature open-source software libraries, the realization of this module is relatively simple. The main functions include FTP protocol analysis and data validity verification.(3)
Scoring service module: this module is the core module of the system, which mainly realizes the performance functions of the broadcasting control and singing process of the scoring service. As the main control module, it dispatches other modules to coordinate work as needed. The main functions include playback control, audio playback, song score analysis, and recording cache and singing interface drawing.(4)
Scoring algorithm module: this module is the basic module of the system, which is mainly responsible for voice information processing and score calculation. Its main functions include voice fundamental frequency extraction, pitch sequence conversion, score calculation, and other functions.


## 3.1. Architecture Design of Scoring Function Module

The traditional DTW algorithm minimizes the total weighted distance through a local optimization method. In this paper, the ant colony algorithm is combined with the DTW algorithm, and the average distortion distance is used to measure the similarity between speech signals, so as to expect accurate recognition results. The design of the song-on-demand scoring function module uses a combination of MVC mode and command mode based on artificial intelligence technology. The view component in the MVC mode is composed of a Java browser embedded in a smart client, which is mainly used to display the content that the user needs to sing and realize the interaction with the user. The controller component uses the command mode design method to encapsulate each command in the software control as an object. These objects can respond to different command statements to complete various operations. Model components are various business logics needed in the software running process. In the song-on-demand scoring system, the scoring function constitutes the model components. Many intelligent terminal devices are connected to the song library server through the local area network, and the database administrator also needs to maintain the service through the local area network. Among them, the song library server may be composed of a server group considering the load pressure and data disaster tolerance, but this is transparent to the terminal devices. All terminal devices are connected to the same logical server through IP addresses. The scoring terminal device is responsible for the interactive operation with the user, which is realized through touch screen, display, microphone, and so on. The administrator is mainly responsible for the maintenance of the internal network and database to ensure the smoothness of the network transmission process.Among them, the singer selects a song to start playing, and the scoring terminal device queries the song library server for song information according to the song number, then downloads the audio file from the server through the FTP file sharing service according to the audio file path in the song information and the song score file path with the score file, and starts to play the song; at the same time, the song and pitch information are displayed on the display according to the timeline. The singer sings according to the screen prompts. The microphone collects the voice signal and transmits it to the scoring terminal. After the scoring algorithm is calculated, the result is fed back to the screen in real time. The singer can view his singing status in real time and make corresponding adjustments to obtain a higher score. After the singing, the scoring terminal will display the final result on the screen to inform the user and upload the singing record to the server for recording.


## 3.2. Song Library Establishment

The establishment of the song library directly affects the accuracy of the experimental data and plays a vital role in the entire system. In practice, even if the same person is in the same environment, the signals of the two recorded songs are difficult to be completely consistent and must be recorded multiple times as an imitated song library. The accuracy of the recorded songs in the song library is set to 16 bits, and the sampling frequency is set to 8 kHz. The collection object of the standard song is the original singer, and the recorded song is used as a template song for comparison with the imitated song.


## 3.3. Control Process of the Song-on-Demand Scoring System

The song-on-demand scoring system realizes the scoring function by rewriting the speech recognition module Sphinx4. Through the singing of the singer, the intelligent client in the system controls the speech recognition module. The smart client determines the song paragraph to be evaluated and then passes the song paragraph to the Sphinx4 speech recognition module in the form of parameters. The voice recognition module will start a specific thread for the song paragraph according to the song paragraph to be investigated. This specific thread will monitor the microphone input data. After the singer’s pronunciation is received by the microphone, it will be passed to the voice recognition module, and the voice recognition module will sing according to the song. The speaker’s pronunciation evaluates a score that is similar to the standard pronunciation, this score is returned to the smart client, and the smart client displays this score on the user interface. The smart client is also responsible for the display of relevant information about the song paragraphs to be investigated and records the number of times the singer has practiced and the results. In addition, the user interface also needs to consider the factors of interactive design and provide functions such as singing timing bar to assist users in using the scoring system and improve the effect of user experience.(1)
Query. The administrator enters the song number or song title, and the system transmits the number and song title data to the database through the database query interface. After the database is processed, the song information is returned. The system feeds back the song information to the administrator to display the query result.(2)
Newly Added. The administrator enters all the attribute values of the song information. The system queries the database for the song information according to the song number in it and determines whether the song information already exists according to the database feedback result. If it exists, encapsulate the song information into a database format, transfer it to the database, and send instructions to add new information; otherwise, it will not be processed.(3)
Delete. The administrator enters the song number or song name, and the system transfers the number and song name data to the database through the database query interface and returns the song information after the database is processed. If the song exists, the entry song information is deleted; otherwise, it will not be processed.(4)
Modification. This operation is a combination of query, deletion, and addition. The administrator enters the song information, and the system knows whether the song exists through the query operation. If it does not exist, add the song information entry to the database through the new operation; otherwise, delete the song first through the delete operation information, and then add a new song information entry to the database through a new operation. The control process of the song-on-demand scoring system is shown in Figure 2.Figure 2
The control process of the song-on-demand scoring system.


## 3.4. Front-End Software Level Model of the Song-on-Demand Scoring System

The song-on-demand scoring system described in this paper is composed of server-side components and client-side components. The server-side components use SQL databases, and the program logic structure is relatively simple, without too much hierarchy. The client scoring system can be divided into 3 levels, from bottom to top: platform dependency layer, scoring business layer, and system application layer. Among them, the platform-dependent layer provides the underlying support for the system’s operating resources and provides a guarantee for system portability by providing standard interfaces to shield the differences between system hardware and operating systems. The scoring business layer is the core of the scoring business logic. The business logic including recording cache, network communication, singing interface, and broadcast control is implemented at this level, and the whole is built with MVC architecture. The system application layer mainly refers to the singing system. The scoring system is designed as a business component of the traditional singing system. It has independent business logic, but it is located under the singing system and is an extension of the original system. Therefore, the system application layer is mainly responsible for the user’s singing operation and finally calls the broadcast control interface of the scoring business layer to complete the business logic of singing scoring.


## 3.5. Software Component Design of Song-on-Demand Scoring System

(i)
The background service component is composed of two modules:(1)
Database operation module: it mainly realizes data operation on SQL database, including song information, query, score history, and score ranking query (currently not used by the front-end system).(2)
Network communication module: it mainly realizes client connection management and request-response functions. Since multiple clients may initiate requests to the server at the same time, the request connection time is variable, and the communication time is short, a thread pool is designed in the network communication module to manage each connection request, so as to avoid the continuous creation and destruction of threads. Improve system concurrency performance. The main functions of this module include communication thread scheduling, request analysis, data distribution, and request-reply.(ii)
The front-end business components of the system are relatively complex and consist of four modules:(1)
Network communication module: it mainly realizes the network connection with the server and request sending and receiving. Compared with the server-side network module, the client-side network module is relatively simple and does not require multithreading. The main functions include connection status management, data request sending and receiving, and reply message analysis.(2)
Resource download module: it mainly realizes the download of audio files and song score files and other resources. Its core is the realization of the PP file remote service client. Since the FTP protocol has mature open-source software libraries, the realization of this module is relatively simple. The main functions include FTP protocol analysis and data validity verification.(3)
Scoring service module: this module is the core module of the system, which mainly realizes the performance functions of the broadcasting control and singing process of the scoring service. As the main control module, it dispatches other modules to coordinate work as needed. The main functions include playback control, audio playback, song score analysis, and recording cache and singing interface drawing.(4)
Scoring algorithm module: this module is the basic module of the system, which is mainly responsible for voice information processing and score calculation. Its main functions include voice fundamental frequency extraction, pitch sequence conversion, score calculation, and other functions.


## 4. Song-on-Demand Scoring System

### 4.1. Song Matching Path Analysis

All experiments in this paper are carried out on a LenovoWin7 PC. The CPU uses Intel’s Corei3-2330M processor, the memory is 2 GB, the main frequency is 220 GHz, and the operating system is 64 bits. The experiment uses MATLAB R2010a for algorithm simulation. The voice recording uses the microphone that comes with the PC, and the recording format is “.WAV.” When the user wants to start playing a song, the user first enters the song number through the playback control interface of the scoring service module, and the scoring service module calls the playback control interface to query the current playback status. If the player is idle, it sends a song query to the server through the network communication module Request; the network communication module sends and receives data to parse the reply package to obtain song information, which is fed back to the scoring service module; the scoring service module obtains the download address of the corresponding resource according to the audio file information and the song score file information and calls the resource download module interface to download to Local; the resource download module calls the FTP protocol library according to the download address to provide an interface to download the file to the local, performs data integrity check, and feeds the local path to the scoring service module; the scoring service module receives the audio file and the song score file and then transfers the audio file path to the audio decoding system to play the song, parse the score file, and pass the obtained pitch sequence information to the scoring algorithm module; the scoring algorithm module obtains the pitch sequence information and fills the corresponding structure information to prepare for the score calculation; so far, the playback start operation is complete. The number of ants in the ant colony isK, the number of cycles is set to N, and the global average distortion distance between the original singing voice and the matching path of the imitating voice is shown in Table 1.Table 1
The global average distortion distance between the matching path of the original voice and the imitated voice.
ND5D10D15D20D25D3050.31570.22670.22530.22350.21320.2145100.24690.25930.22550.22210.21250.2039150.25860.22950.20320.20230.20180.2008200.24350.21090.20310.19370.19410.1950250.24380.20980.20910. 19520.19340.1927300.24310.21820.20150.19910.19420.1926We experimented with singing from the same female voice but at different times. Set up 6 different ant colonies, in which the number of ants and the number of cycles are 5, 10, 15, 20, 25, and 30. It can be seen from Tables2–5 that, in the ant colony algorithm, when the total number of ants is fixed and the number of cycles increases, the global average distortion distance D of the path decreases. When the number of cycles is fixed, the total number of ants increases and the global average distortion distance D of its path decreases. It can be seen that this algorithm is effective in finding the best path. In the experiment, when k = 20 and N = 20, the average distortion distance has not changed significantly with the increase of k and N, and because of the time complexity factor, the experiment will be k = 20, N = 20 corresponding to the path as the best matching path to find the algorithm. The relationship between the number of ants k and the average distortion distance D under different cycles is shown in Figure 3.Table 2
Comparison of test data based on ant colony dynamic time planning algorithm and DTW algorithm.
Identification typeAnt colony dynamic time planning algorithm (%)DTW algorithm (%)Continuous song recognition99.3398.67Table 3
Final statistics.
This paper scoreManual scoringBadAverageGoodBad1093Average8264Good3711Table 4
Original pitch deviation.
Musical alphabetPitch frequency (Hz)Off-centerG4396.39319A4440.9144B44 96.278C5526.50311D5592.60415E5678.94430F5711. 83633G5791.78617A5885.93912B5985.444−4C61057.9119C61057.9119B5985.444−4A5885.93912G5791.78617F5711.83633E5678.94430D5592.60415C5526.50311B4496.278A4440.9144G4396.39319Table 5
Pitch deviation after adjustment.
Musical alphabetPitch frequency (Hz)Off-centerG4394. 88613A4444.44517B4498.37816C5534.62137D5603.94348E5679.73953F5721.13255G5799.72834A5890.17320B5798.193−1C61062.927C61055.0814B5798.193−1A5890.17320G5796.77928F5718.47349E5677.23247D5601.71642C5532.64931B4496.5419A4442.80611G4391.9790Figure 3
The relationship between the number of antsk and the average distortion distance D under different cycles.Table2 shows the comparison results of the test data based on the ant colony dynamic time planning algorithm and the DTW algorithm. It can be seen from Table 2 that when recognizing continuous speech, the recognition rate of the ant colony dynamic time planning algorithm is better than that of the DTW algorithm. Particularly in the case of complex environments, the superiority of the ant colony dynamic time planning algorithm can be better reflected. The main reason is that the algorithm introduces the global average distortion distance when comparing the feature parameter sequence, which solves the situation that the algorithm may enter the local optimum, the algorithm is searched for 20 times in a loop, and the path must be searched after each search. The pheromone on the website is updated. Therefore, the best matching path obtained by looping 20 times is more accurate, which more accurately reflects the small differences between the speech signals.


### 4.2. Singing Score Analysis

In the experiment, part of the original song was selected, and the singing time was 5 minutes. At the same time, select 10 students with high and low singing levels in our laboratory, and record them as A, B, C, D, E, F, G, H, J, and K, so that they can freely choose the songs to sing according to their singing level in the same environment. And another 10 students form a scoring group, and these 10 students are recorded as a, b, c, d, e, f, g, h, j, and k. The scoring group only imitates based on the personal subjective feelings singer’s singing performance is scored, and the manual scoring is compared with the scoring software based on this algorithm. This paper uses 20 different lyrics recorded as the test object. Because each lyric has 4 test voices, it is equivalent to scoring 80 words. In order to show the relevance of the designed song-on-demand scoring system and manual scoring, three levels of manual scoring are given to the test voice: bad: (0–59), average: (60–79), and good: (80–100). The straight line in Figure4 represents the average result of manual scoring, and the curve represents the evaluation result of the scoring algorithm in this paper. The algorithm score in this paper is about 82%. The manual score is about 78%. It can be seen that the scoring results of the algorithm in this paper are almost the same as people’s subjective feelings as a whole, but they are not accurate enough in highlighting the singing level of the singer, and the difference between the manual score and the score obtained by the scoring method of this algorithm is still not to be ignored. The final statistical results are shown in Table 3. The statistical analysis results are shown in Figure 4.Figure 4
Statistical analysis results.The singing scoring operation process mainly involves two modules: the scoring business module and the scoring algorithm. The user’s voice is input into the system through a microphone, and the recording driver in the system collects the signal and then passes through the callback: the mechanism continuously transmits the sampled data to the scoring business module. After the recording buffer class obtains the recording data, according to the playback time of the song, it adds time stamp information to the recording segment and adds the recording data to the buffer queue. There is another thread in the recording buffer class, which continuously checks the length of the recording data in the buffer queue. When the data reaches the required length of a voice frame for scoring, the frame of voice is passed to the scoring algorithm module; after the scoring algorithm module obtains a frame of voice data, it first analyzes the voice signal to extract its fundamental frequency information and passes the pitch. The conversion algorithm obtains the pitch parameters, adds the singing pitch sequence 1, finally adjusts the pitch the score ending interface calculates the current score, and then the score status information is fed back to the scoring service module; the scoring service module feeds back the scoring status to the user through the singing interface; user inputs the sound at the next time point according to the current state and then loops back and forth until the song is played. In this study, before the comparison, the feature parameters of singing audio and music library music should be extracted in units of frames. The advantage of this is that the accuracy of the extracted feature parameters is higher, but the disadvantage is that the computational complexity of the system is greatly increased. Pass the FMS to JSP to extract the pitch feature sequence, and perform the recording pitch data and the MIDI template of the corresponding song in the music database every 8 seconds: the pitch data is compared for similarity, and the singing score in these 8 seconds is calculated (percentage system) and displayed through flash. Before doing the similarity comparison of the final scores, it is necessary to regularize the pitch sequence to get a more accurate final score than simply averaging the short-term scores. Due to the different frequencies of male and female voices, the pitch will also be different. Therefore, before the system performs a similarity comparison, it needs to normalize the singing pitch sequence to the same level as the template pitch sequence and then calculate the similarity to get a score that can better reflect the true level of singing. The original singing analysis result is shown in Figure5. The adjusted analysis result is shown in Figure 6. The original pitch deviation is shown in Table 4. The adjusted pitch deviation is shown in Table 5.Figure 5
Original singer analysis result.Figure 6
Adjusted analysis results.


### 4.3. System Performance Test

Table6 shows the test results of the top 3 and top 10 hit rates of the song-on-demand search engine and the original search engine in this paper. In the tested on-demand search engine, the average hit rate of the top 3 has reached more than 90% under various humming methods, basically maintaining the high hit rate characteristics of the original search engine, and the retrieval results are satisfactory.Table 6
Test results of the hit rate of the top 3 and top 10 of the song-on-demand search engine and the original search engine in this paper.
InputTesting frequencyTop 5 hit rateTop 10 hit rateNew engineOriginal engineNew engineOriginal engineHumph6095.0% (57)93.3% (56)98.3% (59)96. 7% (58)Sing “with lyrics”6083.3% (50)88.3% (52)85.0% (51)93.3% (56)“Whistle” blowing7092.9% (65)94.3% (66)92.9% (65)95.7% (67)Total number of tests19090.5% (172)91.6% (174)92.1% (175)95.3% (181)The average search speed results of the new on-demand search engine and the original search engine are shown in Figure7. According to the given test sample set, the old and new systems are tested separately, and the average retrieval speed results of the two systems are given. The tested new QBH search engine has repeatedly tested 190 humming melodies, and its average search time is about 1/3 of the LAM algorithm, which basically meets the requirements. When using an experimental database with a capacity of 3864, the retrieval time is approximately 3.5 seconds. The result is satisfactory.Figure 7
The average search speed results of the new on-demand search engine and the original search engine.


## 4.1. Song Matching Path Analysis

All experiments in this paper are carried out on a LenovoWin7 PC. The CPU uses Intel’s Corei3-2330M processor, the memory is 2 GB, the main frequency is 220 GHz, and the operating system is 64 bits. The experiment uses MATLAB R2010a for algorithm simulation. The voice recording uses the microphone that comes with the PC, and the recording format is “.WAV.” When the user wants to start playing a song, the user first enters the song number through the playback control interface of the scoring service module, and the scoring service module calls the playback control interface to query the current playback status. If the player is idle, it sends a song query to the server through the network communication module Request; the network communication module sends and receives data to parse the reply package to obtain song information, which is fed back to the scoring service module; the scoring service module obtains the download address of the corresponding resource according to the audio file information and the song score file information and calls the resource download module interface to download to Local; the resource download module calls the FTP protocol library according to the download address to provide an interface to download the file to the local, performs data integrity check, and feeds the local path to the scoring service module; the scoring service module receives the audio file and the song score file and then transfers the audio file path to the audio decoding system to play the song, parse the score file, and pass the obtained pitch sequence information to the scoring algorithm module; the scoring algorithm module obtains the pitch sequence information and fills the corresponding structure information to prepare for the score calculation; so far, the playback start operation is complete. The number of ants in the ant colony isK, the number of cycles is set to N, and the global average distortion distance between the original singing voice and the matching path of the imitating voice is shown in Table 1.Table 1
The global average distortion distance between the matching path of the original voice and the imitated voice.
ND5D10D15D20D25D3050.31570.22670.22530.22350.21320.2145100.24690.25930.22550.22210.21250.2039150.25860.22950.20320.20230.20180.2008200.24350.21090.20310.19370.19410.1950250.24380.20980.20910. 19520.19340.1927300.24310.21820.20150.19910.19420.1926We experimented with singing from the same female voice but at different times. Set up 6 different ant colonies, in which the number of ants and the number of cycles are 5, 10, 15, 20, 25, and 30. It can be seen from Tables2–5 that, in the ant colony algorithm, when the total number of ants is fixed and the number of cycles increases, the global average distortion distance D of the path decreases. When the number of cycles is fixed, the total number of ants increases and the global average distortion distance D of its path decreases. It can be seen that this algorithm is effective in finding the best path. In the experiment, when k = 20 and N = 20, the average distortion distance has not changed significantly with the increase of k and N, and because of the time complexity factor, the experiment will be k = 20, N = 20 corresponding to the path as the best matching path to find the algorithm. The relationship between the number of ants k and the average distortion distance D under different cycles is shown in Figure 3.Table 2
Comparison of test data based on ant colony dynamic time planning algorithm and DTW algorithm.
Identification typeAnt colony dynamic time planning algorithm (%)DTW algorithm (%)Continuous song recognition99.3398.67Table 3
Final statistics.
This paper scoreManual scoringBadAverageGoodBad1093Average8264Good3711Table 4
Original pitch deviation.
Musical alphabetPitch frequency (Hz)Off-centerG4396.39319A4440.9144B44 96.278C5526.50311D5592.60415E5678.94430F5711. 83633G5791.78617A5885.93912B5985.444−4C61057.9119C61057.9119B5985.444−4A5885.93912G5791.78617F5711.83633E5678.94430D5592.60415C5526.50311B4496.278A4440.9144G4396.39319Table 5
Pitch deviation after adjustment.
Musical alphabetPitch frequency (Hz)Off-centerG4394. 88613A4444.44517B4498.37816C5534.62137D5603.94348E5679.73953F5721.13255G5799.72834A5890.17320B5798.193−1C61062.927C61055.0814B5798.193−1A5890.17320G5796.77928F5718.47349E5677.23247D5601.71642C5532.64931B4496.5419A4442.80611G4391.9790Figure 3
The relationship between the number of antsk and the average distortion distance D under different cycles.Table2 shows the comparison results of the test data based on the ant colony dynamic time planning algorithm and the DTW algorithm. It can be seen from Table 2 that when recognizing continuous speech, the recognition rate of the ant colony dynamic time planning algorithm is better than that of the DTW algorithm. Particularly in the case of complex environments, the superiority of the ant colony dynamic time planning algorithm can be better reflected. The main reason is that the algorithm introduces the global average distortion distance when comparing the feature parameter sequence, which solves the situation that the algorithm may enter the local optimum, the algorithm is searched for 20 times in a loop, and the path must be searched after each search. The pheromone on the website is updated. Therefore, the best matching path obtained by looping 20 times is more accurate, which more accurately reflects the small differences between the speech signals.


## 4.2. Singing Score Analysis

In the experiment, part of the original song was selected, and the singing time was 5 minutes. At the same time, select 10 students with high and low singing levels in our laboratory, and record them as A, B, C, D, E, F, G, H, J, and K, so that they can freely choose the songs to sing according to their singing level in the same environment. And another 10 students form a scoring group, and these 10 students are recorded as a, b, c, d, e, f, g, h, j, and k. The scoring group only imitates based on the personal subjective feelings singer’s singing performance is scored, and the manual scoring is compared with the scoring software based on this algorithm. This paper uses 20 different lyrics recorded as the test object. Because each lyric has 4 test voices, it is equivalent to scoring 80 words. In order to show the relevance of the designed song-on-demand scoring system and manual scoring, three levels of manual scoring are given to the test voice: bad: (0–59), average: (60–79), and good: (80–100). The straight line in Figure4 represents the average result of manual scoring, and the curve represents the evaluation result of the scoring algorithm in this paper. The algorithm score in this paper is about 82%. The manual score is about 78%. It can be seen that the scoring results of the algorithm in this paper are almost the same as people’s subjective feelings as a whole, but they are not accurate enough in highlighting the singing level of the singer, and the difference between the manual score and the score obtained by the scoring method of this algorithm is still not to be ignored. The final statistical results are shown in Table 3. The statistical analysis results are shown in Figure 4.Figure 4
Statistical analysis results.The singing scoring operation process mainly involves two modules: the scoring business module and the scoring algorithm. The user’s voice is input into the system through a microphone, and the recording driver in the system collects the signal and then passes through the callback: the mechanism continuously transmits the sampled data to the scoring business module. After the recording buffer class obtains the recording data, according to the playback time of the song, it adds time stamp information to the recording segment and adds the recording data to the buffer queue. There is another thread in the recording buffer class, which continuously checks the length of the recording data in the buffer queue. When the data reaches the required length of a voice frame for scoring, the frame of voice is passed to the scoring algorithm module; after the scoring algorithm module obtains a frame of voice data, it first analyzes the voice signal to extract its fundamental frequency information and passes the pitch. The conversion algorithm obtains the pitch parameters, adds the singing pitch sequence 1, finally adjusts the pitch the score ending interface calculates the current score, and then the score status information is fed back to the scoring service module; the scoring service module feeds back the scoring status to the user through the singing interface; user inputs the sound at the next time point according to the current state and then loops back and forth until the song is played. In this study, before the comparison, the feature parameters of singing audio and music library music should be extracted in units of frames. The advantage of this is that the accuracy of the extracted feature parameters is higher, but the disadvantage is that the computational complexity of the system is greatly increased. Pass the FMS to JSP to extract the pitch feature sequence, and perform the recording pitch data and the MIDI template of the corresponding song in the music database every 8 seconds: the pitch data is compared for similarity, and the singing score in these 8 seconds is calculated (percentage system) and displayed through flash. Before doing the similarity comparison of the final scores, it is necessary to regularize the pitch sequence to get a more accurate final score than simply averaging the short-term scores. Due to the different frequencies of male and female voices, the pitch will also be different. Therefore, before the system performs a similarity comparison, it needs to normalize the singing pitch sequence to the same level as the template pitch sequence and then calculate the similarity to get a score that can better reflect the true level of singing. The original singing analysis result is shown in Figure5. The adjusted analysis result is shown in Figure 6. The original pitch deviation is shown in Table 4. The adjusted pitch deviation is shown in Table 5.Figure 5
Original singer analysis result.Figure 6
Adjusted analysis results.


## 4.3. System Performance Test

Table6 shows the test results of the top 3 and top 10 hit rates of the song-on-demand search engine and the original search engine in this paper. In the tested on-demand search engine, the average hit rate of the top 3 has reached more than 90% under various humming methods, basically maintaining the high hit rate characteristics of the original search engine, and the retrieval results are satisfactory.Table 6
Test results of the hit rate of the top 3 and top 10 of the song-on-demand search engine and the original search engine in this paper.
InputTesting frequencyTop 5 hit rateTop 10 hit rateNew engineOriginal engineNew engineOriginal engineHumph6095.0% (57)93.3% (56)98.3% (59)96. 7% (58)Sing “with lyrics”6083.3% (50)88.3% (52)85.0% (51)93.3% (56)“Whistle” blowing7092.9% (65)94.3% (66)92.9% (65)95.7% (67)Total number of tests19090.5% (172)91.6% (174)92.1% (175)95.3% (181)The average search speed results of the new on-demand search engine and the original search engine are shown in Figure7. According to the given test sample set, the old and new systems are tested separately, and the average retrieval speed results of the two systems are given. The tested new QBH search engine has repeatedly tested 190 humming melodies, and its average search time is about 1/3 of the LAM algorithm, which basically meets the requirements. When using an experimental database with a capacity of 3864, the retrieval time is approximately 3.5 seconds. The result is satisfactory.Figure 7
The average search speed results of the new on-demand search engine and the original search engine.


## 5. Conclusion

The traditional DTW algorithm minimizes the total weighted distance through a local optimization method. In this paper, the ant colony algorithm is combined with the DTW algorithm, and the average distortion distance is used to measure the similarity between speech signals, so as to expect accurate recognition results. The design of the song-on-demand scoring function module uses a combination of MVC mode and command mode based on AI technology. The view component in the MVC mode is composed of a Java browser embedded in a smart client, which is mainly used to display the content that the user needs to sing and realize the interaction with the user.The controller component uses the command mode design method to encapsulate each command in the software control as an object. These objects can respond to different command statements to complete various operations. Model components are various business logics needed in the software running process. In the song-on-demand scoring system, the scoring function constitutes the model components. The song-on-demand scoring system realizes the scoring function by rewriting the speech recognition module Sphinx4. Through the singing of the singer, the intelligent client in the system controls the speech recognition module.The smart client determines the song paragraph to be evaluated and then passes the song paragraph to the Sphinx4 speech recognition module in the form of parameters. The voice recognition module will start a specific thread for the song paragraph according to the song paragraph to be investigated. This specific thread will monitor the microphone input data. After the singer’s pronunciation is received by the microphone, it will be passed to the voice recognition module, and the voice recognition module will sing according to the song. The speaker’s pronunciation evaluates a score that is similar to the standard pronunciation, and this score is returned to the smart client, and the smart client displays this score on the user interface. The smart client is also responsible for the display of relevant information about the song paragraphs to be investigated and records the number of times the singer has practiced and the results. In addition, the user interface also needs to consider the factors of interactive design and provide functions such as singing timing bar to assist users in using the scoring system and improve the effect of user experience.



---

*Source: 5510401-2021-03-22.xml*