An automatic volume-adjustment method carried out by an electronic device, comprising: obtaining a game type of a current game; when the obtained game type matches a predetermined game type, obtaining audio data of the current game and recognizing whether one of a plurality of predetermined sound categories determined in accordance with the obtained game type is included in the obtained audio data of the current game; when one of the predetermined sound categories is included in the obtained audio data, determining a volume gain based on said sound category included in the obtained audio data; and adjusting a volume of the obtained audio data according to the volume gain; wherein the step of recognizing comprises: retrieving a plurality of frames from the obtained audio data, wherein the frames are sequentially spaced apart from each other by a first number of sampling points, and each of the frames comprises a second number of sampling points; using one of the frames as a current frame; and recognizing whether one of the predetermined sound categories is included in the current frame; and wherein the step of determining the volume gain comprises: when one of the predetermined sound categories is included in the current frame, obtaining a plurality of estimated gains of a plurality of previous frames and the current frame, wherein the previous frames are earlier frames than the current frame, and each of the previous frames and the current frame is respectively associated with a corresponding gain adjustment coefficient; and determining the volume gain of the current frame by adding up the products of the estimated gain of each of the previous frames and the corresponding gain adjustment coefficient with the product of the estimated gain of the current frame and the corresponding gain adjustment coefficient wherein the sum of the gain adjustment coefficients is equal to 1; wherein each of the predetermined sound categories has an average recognition rate and a custom gain, and each of the frames has a confidence score, wherein the estimated gain of the previous frame which comprises one of the predetermined sound categories and the estimated gain of the current frame are separately generated by subtracting 1 from the custom gain, multiplying this by the average recognition rate and by the confidence score, and then adding 1 to the product, wherein the estimated gain of the previous frame which comprises none of the predetermined sound categories is zero. obtaining a game type of a current game; when the obtained game type matches a predetermined game type, obtaining audio data of the current game and recognizing whether one of a plurality of predetermined sound categories determined in accordance with the obtained game type is included in the obtained audio data of the current game; when one of the predetermined sound categories is included in the obtained audio data, determining a volume gain based on said sound category included in the obtained audio data; and adjusting a volume of the obtained audio data according to the volume gain; retrieving a plurality of frames from the obtained audio data, wherein the frames are sequentially spaced apart from each other by a first number of sampling points, and each of the frames comprises a second number of sampling points; using one of the frames as a current frame; and recognizing whether one of the predetermined sound categories is included in the current frame; and wherein the step of determining the volume gain comprises: when one of the predetermined sound categories is included in the current frame, obtaining a plurality of estimated gains of a plurality of previous frames and the current frame, wherein the previous frames are earlier frames than the current frame, and each of the previous frames and the current frame is respectively associated with a corresponding gain adjustment coefficient; and when one of the predetermined sound categories is included in the current frame, obtaining a plurality of estimated gains of a plurality of previous frames and the current frame, wherein the previous frames are earlier frames than the current frame, and each of the previous frames and the current frame is respectively associated with a corresponding gain adjustment coefficient; and determining the volume gain of the current frame by adding up the products of the estimated gain of each of the previous frames and the corresponding gain adjustment coefficient with the product of the estimated gain of the current frame and the corresponding gain adjustment coefficient wherein the sum of the gain adjustment coefficients is equal to 1; wherein each of the predetermined sound categories has an average recognition rate and a custom gain, and each of the frames has a confidence score, wherein the estimated gain of the previous frame which comprises one of the predetermined sound categories and the estimated gain of the current frame are separately generated by subtracting 1 from the custom gain, multiplying this by the average recognition rate and by the confidence score, and then adding 1 to the product, wherein the estimated gain of the previous frame which comprises none of the predetermined sound categories is zero.