top of page
- Script Code -

dofile(reaper.AZ_GetLuaInitPath())

require("reaper_AZSTOKE_BRONZE")  

require("reaper_AZSTOKE_SILVER")   


function Transcription(track)


   trscTrack = reaper.AZ_InsertUniqueChildTrack(track, "Transcription")

   

   itemList = reaper.AZ_GetMediaItemListInTrackItem(track)

   

   -- モデルを読み込み

   ctx = reaper.AZ_TRSC_LoadModel()

   

   for i, item in pairs(itemList) do

      

      -- 文字起こし実行

      text = reaper.AZ_TRSC_FullForMediaItem(ctx, item, "ja")

      

      itemStart = reaper.AZ_GetMediaItemStartTimeSeconds(item)

      itemLength = reaper.AZ_GetMediaItemLength(item)

      

      reaper.AZ_InsertNoteItemToTrack(trscTrack, itemStart, itemLength, text)

      

   end

   

   -- モデルを解放

   reaper.AZ_TRSC_ReleaseModel(ctx)

   

   reaper.AZ_ShowMessageBox_Info("文字起こしが終了しました", "", reaper.AZ_WindowType_OK())


end


function main()


   track = reaper.AZ_GetTrackItemSelect(0, 0, 1)

   

   if track == nil then

       reaper.AZ_ShowMessageBox_Error("トラックが選択されていません。", "Error", reaper.AZ_WindowType_OK())

       return

   end


   -- リージョン作成

   itemList = reaper.AZ_GetMediaItemListInTrackItem(track)

   for i, item in pairs(itemList) do

       reaper.AZ_AddRegionMarkerMediaItem(item)

   end

   

   Transcription(track)

end


main()

- Warm Up -

  • Arrange voice media in Reaper

- Script Detail -

dofile(reaper.AZ_GetLuaInitPath())

require("reaper_AZSTOKE_BRONZE")  

require("reaper_AZSTOKE_SILVER")  


・ Import RIGDOCKS


function Transcription(track)


・ Function to run transcription


   trscTrack = reaper.AZ_InsertUniqueChildTrack(track, "Transcription")


・ Create a track to hold the transcription results

   

   itemList = reaper.AZ_GetMediaItemListInTrackItem(track)

   

・ Get the list of items to transcribe


   -- モデルを読み込み

   ctx = reaper.AZ_TRSC_LoadModel()

   

・ Load the transcription model


   for i, item in pairs(itemList) do

      

・ Loop for the number of items


      -- 文字起こし実行

      text = reaper.AZ_TRSC_FullForMediaItem(ctx, item, "ja")

      

・ Run transcription on the item (Japanese specified)


      itemStart = reaper.AZ_GetMediaItemStartTimeSeconds(item)


・ Get the item start position


      itemLength = reaper.AZ_GetMediaItemLength(item)


・ Get the item length

      

      reaper.AZ_InsertNoteItemToTrack(trscTrack, itemStart, itemLength, text)


・ Insert the transcription result into the track as a Note item

      

   end

   

   -- モデルを解放

   reaper.AZ_TRSC_ReleaseModel(ctx)


・ Release the transcription model

   

   reaper.AZ_ShowMessageBox_Info("文字起こしが終了しました", "", reaper.AZ_WindowType_OK())


・ Show the end message


end


function main()


・ Main function


   track = reaper.AZ_GetTrackItemSelect(0, 0, 1)


・ Check whether a track is selected

   

   if track == nil then

       reaper.AZ_ShowMessageBox_Error("トラックが選択されていません。", "Error", reaper.AZ_WindowType_OK())

       return

   end


・ If no track is selected, show an error message and exit


   -- リージョン作成

   itemList = reaper.AZ_GetMediaItemListInTrackItem(track)


・ Get the list of items to transcribe


   for i, item in pairs(itemList) do

       reaper.AZ_AddRegionMarkerMediaItem(item)


・ Create a region at the item position


   end

   

   Transcription(track)


・ Run transcription


end


main()


・ Run the main function

- API LINK -
- API LINK -

Transcription

AZSTOKE_TRSC_OutputToProject

Write transcription results to note items

01_BRONZE_ss_edited.png
01_SILVER_edited_edited.png
03_GOLD_edited_edited.png
bottom of page