A method, performed by an electronic device, of recognizing speech of a user, the method comprising: obtaining an audio signal based on a speech input; based on the audio signal being input, obtaining an output value of a first speech recognition model that outputs a character string at a first level and a first encoded audio signal of the audio signal representing user acoustic information, wherein the first speech recognition model comprises a first encoder (302, 1010) and a first decoder (304, 1030) comprising a first attention applier, a soft max layer and a decision layer, wherein the character string at the first level is obtained by the first decoder (304, 1030) based on the first encoded audio signal from the first encoder (302, 1010); obtaining an output value of a second speech recognition model that outputs a character string at a second level corresponding to the audio signal based on the output value of the first speech recognition model including the character string at the first level and the first encoded audio signal, wherein the second speech recognition model includes a second encoder (306, 1040) and a second decoder (308, 1070) comprising a second attention applier, a third attention applier, a soft max layer and a decision layer, wherein the character string at the second level is obtained by the second decoder (308, 1070) based on the character string at the first level and a second encoded audio signal, wherein the second encoded audio signal is obtained by the second encoder (306, 1040) based on the first encoded audio signal; and recognizing the speech from the output value of the second speech recognition model. obtaining an audio signal based on a speech input; based on the audio signal being input, obtaining an output value of a first speech recognition model that outputs a character string at a first level and a first encoded audio signal of the audio signal representing user acoustic information, wherein the first speech recognition model comprises a first encoder (302, 1010) and a first decoder (304, 1030) comprising a first attention applier, a soft max layer and a decision layer, wherein the character string at the first level is obtained by the first decoder (304, 1030) based on the first encoded audio signal from the first encoder (302, 1010); obtaining an output value of a second speech recognition model that outputs a character string at a second level corresponding to the audio signal based on the output value of the first speech recognition model including the character string at the first level and the first encoded audio signal, wherein the second speech recognition model includes a second encoder (306, 1040) and a second decoder (308, 1070) comprising a second attention applier, a third attention applier, a soft max layer and a decision layer, wherein the character string at the second level is obtained by the second decoder (308, 1070) based on the character string at the first level and a second encoded audio signal, wherein the second encoded audio signal is obtained by the second encoder (306, 1040) based on the first encoded audio signal; and recognizing the speech from the output value of the second speech recognition model.