It seems to my humble opinion that our teacher, the Beit Yosef, maintains that these two laws do not contradict one another. For granted that there is certainly a mitzvah in the contemplation of Torah, nevertheless, the primary mitzvah of Talmud Torah is study with the mouth. For many times we find in Tanakh that "hegyon" refers to speech of the mouth, such as "And my tongue shall speak (tehgeh) of Your righteousness," "The mouth of the righteous utters (yehegeh) wisdom," "They do not speak (yehegu) with their throat," "For my palate shall speak (yehegeh) truth." And in a place where the intention is the heart, the term "heart" is written there, such as: "And the meditation (vehegyon) of my heart," "And the meditation (vehagut) of my heart is understanding." And in Proverbs: "The heart of the righteous meditates (yehegeh) to answer," "For their heart meditates (yehegeh) destruction." And if so, regarding the Torah where it is written: "And you shall meditate (vehagita) on it day and night," and likewise: "And in His Torah he meditates (yehegeh) day and night" – this means with the mouth, since it did not mention "heart." And the blessing of the Torah itself shall prove it, as we say "Please make pleasant... in our mouths and in the mouths of Your people..." And likewise "to engage (la'asok) in words of Torah" – this means speech with the mouth. And in Eruvin (54a) they were particular even regarding one who studies in a whisper, and they expounded "Ordered in all things and secure" – that it should be ordered in your 248 limbs, see there. Therefore, the blessing of the Torah was not instituted for the contemplation of Torah, but only for study with the mouth. However, writing is different, for this is the primary preservation of the Torah. And not only the Written Torah, but even the Oral Torah after they permitted it to be written – it is like one who teaches Torah to the masses, for the primary preservation of the Torah is through writing, and were it not for writing, the Torah would have already been forgotten from Israel. Therefore, since at the time of writing he contemplates in his heart and brings it out through writing – it is like speech, and he is obligated to bless. And so it seems to my humble opinion as the primary ruling. (And so it is implied in the Mekhilta and in the Midrash at the beginning of "Yitro," that writing is like speech.)
ונראה לעניות דעתי דסבירא ליה לרבינו הבית יוסף דאין שני דינים אלו סותרים זה את זה. דנהי דוודאי יש מצוה בהרהור תורה, מכל מקום עיקר מצות תלמוד תורה הוי לימוד בפה. דהרבה פעמים מצינו בתנ"ך ד"הגיון" הוא על דיבור פה, כמו "ולשוני תהגה צדקיך", "פי צדיק יהגה חכמה", "לא יהגו בגרונם", "כי אמת יהגה חיכי". ובמקום שהכוונה על הלב, כתיב שם לשון "לב", כמו: "והגיון לבי", "והגות לבי תבונות". ובמשלי: "לב צדיק יהגה לענות", "כי שוד יהגה לבם". ואם כן בתורה דכתיב: "והגית בו יומם ולילה", וכן: "ובתורתו יהגה יומם ולילה" – היינו בפה, כיון שלא הזכיר "לב". וברכת התורה עצמה יוכיח, שאומרים "הערב נא… בפינו ובפיות עמך…". וכן "לעסוק בדברי תורה" – היינו דיבור בפה. ובעירובין (נד א) הקפידו אף על מי שלומד בלחש, ודרשו "ערוכה בכל ושמורה" – שתהא ערוכה ברמ"ח איברים שלך, עיין שם. ולכן לא נתקנה ברכת התורה על הרהור תורה, רק על לימוד בפה. אך בכתיבה שאני, שהרי זהו עיקר קיום התורה. ולא מיבעיא תורה שבכתב, אלא אפילו תורה שבעל פה אחר שהתירו לכותבה – הוי כמלמד תורה לרבים, שהרי עיקר קיום התורה היא על ידי כתיבה, ואלמלי כתיבה כבר נשתכחה תורה מישראל. ולכן כיון שבעת הכתיבה מהרהר בלבו ומוציאה לחוץ על ידי כתיבה – הוי כדיבור, וחייב לברך. וכן נראה לעניות דעתי עיקר לדינא. (וכן משמע במכילתא ובמדרש ריש "יתרו", דכתיבה הוי כדיבור.)