Shmuel said: If one resolved in his heart to give, he must also utter it with his lips, as it is stated, "to express clearly with the lips" (Leviticus 5:4). They raised an objection: "with the lips" -- and not in the heart. From where do we learn one who resolved in his heart? The verse teaches, "for whatever a man shall utter" (Leviticus 5:4). Rava said: Answer and explain it thus -- "with the lips," meaning, not in a case where he resolved in his heart to say "wheat bread" and uttered "barley bread" instead. But where he resolved in his heart to say "wheat bread" and uttered simply "bread" without specifying, from where do we know that he is bound by his heart's intent? The verse teaches, "for whatever a man shall utter."
Resolving in the Heart and Speaking With the Lips for a Vow
Yalkut Shimoni on Torah 409:4
אֲמַר שְׁמוּאֵל. גָּמַר בְּלִבּוֹ, צָרִיךְ שֶׁיּוֹצִיא בִּשְׂפָתָיו, שֶׁנֶּאֱמַר (ויקרא ה, ד) "לְבַטֵּא בִשְׂפָתַיִם". מֵיתִיבִי, "בִשְׂפָתַיִם", וְלֹא בְלֵב, גָּמַר בְּלִבּוֹ. מִנָּיִן, תַּלְמוּד לוֹמַר (שם) "לְכֹל אֲשֶׁר יְבַטֵּא". אֲמַר רָבָא, תְּרִיץ וְאֵימָא הָכֵי, "בִּשְׂפָתָיִם", וְלֹא שֶׁגָּמַר בְּלִבּוֹ לְהוֹצִיא פַּת חִטִּים וְהוֹצִיא פַּת שְׂעוֹרִין, גָּמַר בְּלִבּוֹ לְהוֹצִיא פַּת חִטִּים וְהוֹצִיא פַּת סְתָם מִנַּיִן, תַּלְמוּד לוֹמַר "לְכָל אֲשֶׁר יְבַטֵּא".