Marksdo / Whisper

Batch Local Transcribe Audio/Movie To Text With Whisper AI Model. Keep Privacy Safe!
https://whisper.marksdo.com
17 stars 3 forks source link

I am using multi language with record function in the app and now I am facing this issue. #26

Open wqwe2 opened 7 months ago

wqwe2 commented 7 months ago
ScreenShot 2024-03-04 20 50 10

how can I fix this issue?

wqwe2 commented 7 months ago

this issue pops up when I am trying to import the XML file where it exported from whispermate

Marksdo commented 7 months ago

open the exported file, find duration="0/24000s" string, it seem 0 zero is wrong

check the source subtitle editor, is some time range start == end ?

or if you can post the full export file here is better to find issue or send to imarksdo@gmail.com

Marksdo commented 7 months ago

try change duration="0/24000s" to duration="1001/24000s"

but the key cause may be the transcribe time range duration is zero

wqwe2 commented 7 months ago

I have tried with another video source and facing the same issue. here is the file exported from your app. issue Stream Project.fcpxml.zip

wqwe2 commented 7 months ago

change all "0/24000"s to 1001/2400s ? let me try it now!

wqwe2 commented 7 months ago

I have tried and the sync is not correct..

Marksdo commented 7 months ago
image

temporary change this two place to 768768

Marksdo commented 7 months ago

temporary manual count the duration

image

use latest subtitle's offset value + duration value is the full duration can you export the .srt format file then send me. I can fix it and try to release an new version tonight.

wqwe2 commented 7 months ago

alright, I will send you now, this file is the previously I have experienced issue. issue Stream Project.srt.zip

Marksdo commented 7 months ago

Are you use this feature convert to normal project then export ?

image
wqwe2 commented 7 months ago

No I use this ![Uploading ScreenShot 2024-03-04 21.39.22.png…]()

Marksdo commented 7 months ago

alright, I will send you now, this file is the previously I have experienced issue. issue Stream Project.srt.zip

I use this file and export to fcpxml2398 it can open with FCP no issue.

wqwe2 commented 7 months ago

Also could you please add multi language dictation function for media that already added? I think for multi language is only support by recording function.

wqwe2 commented 7 months ago

hmm i yours working i do not know what causing the issue then...

Marksdo commented 7 months ago

No I use this Uploading ScreenShot 2024-03-04 21.39.22.png…

Your screenshot is broken

wqwe2 commented 7 months ago
ScreenShot 2024-03-04 21 39 22
Marksdo commented 7 months ago

Also could you please add multi language dictation function for media that already added? I think for multi language is only support by recording function.

  1. download media already added project's wav file to pyannote.py folder image

2.use embed pyannote shell to do diarization

3.parse the result to

image
Marksdo commented 7 months ago
ScreenShot 2024-03-04 21 39 22

It seem that you export stream from multi stream file?

image

Is these number all the same?

wqwe2 commented 7 months ago

I have tried again with same stream, the numbers are all same here is the XML file. please try this on your FCP. I still seeing the issue..

ScreenShot 2024-03-04 21 56 47

Stream Project.fcpxml.zip

Marksdo commented 7 months ago

It's these your stream steps?

1.add stream project 2.start record 3.stop record (is stop?) 4.export fcpxml 5.get issue

Thank you for taking the time to help me identify the issue. If I can rephrase the question on my end, I can fix it.

Marksdo commented 7 months ago

Sorry i must leave 1 hour. Response will delay now 🙏

wqwe2 commented 7 months ago

here is my my steps

  1. press record
  2. select app i.e. final cut pro or youtube video
  3. export 2399 XML
  4. import on FCP and Get error message
wqwe2 commented 7 months ago

ok, thanks for prompt replies, hope this issue resolves soon. cheers

Marksdo commented 7 months ago

here is my my steps

  1. press record
  2. select app i.e. final cut pro or youtube video
  3. export 2399 XML
  4. import on FCP and Get error message

Thanks, I checking now

Marksdo commented 7 months ago

can you help me to use below template to paste to custom template panel then run test result, and paste the result here?

{%- setvar 2398 $fcpName -%}
{%- setvar 1001 $fr1s -%}
{%- setvar 24 $frds -%}
{%- setvar "24000s" $frhs -%}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fcpxml>
<fcpxml version="1.9">
  <resources>
    <format id="r1" name="FFVideoFormat1080p{{$fcpName}}" frameDuration="{{$fr1s}}/{{$frhs}}" width="1920" height="1080" colorSpace="1-1-1 (Rec. 709)"/>
    <effect id="r2" name="Basic Title" uid=".../Titles.localized/Bumper:Opener.localized/Basic Title.localized/Basic Title.moti"/>
  </resources>
  <library>
    <event name="{{ projectName }}" uid="{{ 32|rand }}">
      <project name="{{ projectName }}" uid="{{ 32|rand }}" modDate="2023-08-25 04:43:49 +0000">
       {{ durationSegLatest }}     
       {{ durationSegLatest|div:1000 }}
       {{ durationSegLatest|div:1000|m:$frds }}
       {{ durationSegLatest|div:1000|m:$frds|round:-1 }}
       {{ $fr1s }} 
       {%- setvar durationSegLatest|div:1000|m:$frds|round:-1|m:$fr1s durationFCPSRT %}
        <sequence format="r1" duration="{{ durationFCPSRT }}/{{$frhs}}" tcStart="0/{{$frds}}s" tcFormat="NDF" audioLayout="stereo" audioRate="48k">
          <spine>
            <gap name="Gap" offset="0s" start="0s" duration="{{ durationFCPSRT }}/{{$frhs}}">
                {%- for st in subtitles -%}
          {%- setvar st.t0ss|m:$frds|round:-1|m:$fr1s st0fcps -%}
          {%- setvar st.t1ss|m:$frds|round:-1|m:$fr1s st1fcps -%}
          {%- setvar st.tdss|m:$frds|round:-1|m:$fr1s stdfcps -%}
          {%- setvar st1fcps|minus:st0fcps st10fcps %}
              <title ref="r2" lane="1" name="{{ st.text|escXML }} - Basic Title" offset="{{st0fcps}}/{{$frhs}}" start="{{st0fcps}}/{{$frhs}}" duration="{{stdfcps}}/{{$frhs}}">
                <param name="Flatten" key="9999/999166631/999166633/2/351" value="1"/>
                <param name="Alignment" key="9999/999166631/999166633/2/354/3142713059/401" value="1 (Center)"/>
                <param name="Alignment" key="9999/999166631/999166633/2/354/999169573/401" value="1 (Center)"/>
                <text>
                  <text-style ref="ts{{ st.idx1 }}">{{ st.text|escXML }}</text-style>
                </text>
                <text-style-def id="ts{{ st.idx1 }}">
                  <text-style font="Helvetica" fontSize="60" fontFace="Regular" fontColor="1 1 1 1" alignment="center"/>
                </text-style-def>
              </title>
             {% endfor %}
            </gap>
          </spine>
        </sequence>
      </project>
    </event>
    <smart-collection name="Projects" match="all">
      <match-clip rule="is" type="project"/>
    </smart-collection>
    <smart-collection name="All Video" match="any">
      <match-media rule="is" type="videoOnly"/>
      <match-media rule="is" type="videoWithAudio"/>
    </smart-collection>
    <smart-collection name="Audio Only" match="all">
      <match-media rule="is" type="audioOnly"/>
    </smart-collection>
    <smart-collection name="Stills" match="all">
      <match-media rule="is" type="stills"/>
    </smart-collection>
    <smart-collection name="Favorites" match="all">
      <match-ratings value="favorites"/>
    </smart-collection>
  </library>
</fcpxml>
image image
Marksdo commented 7 months ago

the export template key to count media duration is

{%- setvar durationSegLatest|div:1000|m:$frds|round:-1|m:$fr1s durationFCPSRT %}

i add template text to output the step value to found where is the issue, as i test in my local device is all ok.

       {{ durationSegLatest }}     
       {{ durationSegLatest|div:1000 }}
       {{ durationSegLatest|div:1000|m:$frds }}
       {{ durationSegLatest|div:1000|m:$frds|round:-1 }}
       {{ $fr1s }} 
       {%- setvar durationSegLatest|div:1000|m:$frds|round:-1|m:$fr1s durationFCPSRT %}
wqwe2 commented 7 months ago

mate I did what as you said.. created new template and pasted and tested run and tried exporting the XML and Now I am facing another issue when i import the XML file into my FCP.. here is the error

ScreenShot 2024-03-05 13 26 32
Marksdo commented 7 months ago

It's right, new template it just to output some debug key data in the xml, can you post the result xml file here to let me check it?

wqwe2 commented 7 months ago

Here, test run Stream Project.fcpxml.zip

Marksdo commented 7 months ago

from the post the key debug data show it's right, so try use below new template text to test again

{%- setvar 2398 $fcpName -%}
{%- setvar 1001 $fr1s -%}
{%- setvar 24 $frds -%}
{%- setvar "24000s" $frhs -%}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fcpxml>
<fcpxml version="1.9">
  <resources>
    <format id="r1" name="FFVideoFormat1080p{{$fcpName}}" frameDuration="{{$fr1s}}/{{$frhs}}" width="1920" height="1080" colorSpace="1-1-1 (Rec. 709)"/>
    <effect id="r2" name="Basic Title" uid=".../Titles.localized/Bumper:Opener.localized/Basic Title.localized/Basic Title.moti"/>
  </resources>
  <library>
    <event name="{{ projectName }}" uid="{{ 32|rand }}">
      <project name="{{ projectName }}" uid="{{ 32|rand }}" modDate="2023-08-25 04:43:49 +0000">
       {%- setvar durationSegLatest|div:1000|m:$frds|round:-1|m:$fr1s durationFCPSRT %}
        <sequence format="r1" duration="{{ durationFCPSRT }}/{{$frhs}}" tcStart="0/{{$frds}}s" tcFormat="NDF" audioLayout="stereo" audioRate="48k">
          <spine>
            <gap name="Gap" offset="0s" start="0s" duration="{{ durationFCPSRT }}/{{$frhs}}">
                {%- for st in subtitles -%}
          {%- setvar st.t0ss|m:$frds|round:-1|m:$fr1s st0fcps -%}
          {%- setvar st.t1ss|m:$frds|round:-1|m:$fr1s st1fcps -%}
          {%- setvar st.tdss|m:$frds|round:-1|m:$fr1s stdfcps -%}
          {%- setvar st1fcps|minus:st0fcps st10fcps %}
              <title ref="r2" lane="1" name="{{ st.text|escXML }} - Basic Title" offset="{{st0fcps}}/{{$frhs}}" start="{{st0fcps}}/{{$frhs}}" duration="{{stdfcps}}/{{$frhs}}">
                <param name="Flatten" key="9999/999166631/999166633/2/351" value="1"/>
                <param name="Alignment" key="9999/999166631/999166633/2/354/3142713059/401" value="1 (Center)"/>
                <param name="Alignment" key="9999/999166631/999166633/2/354/999169573/401" value="1 (Center)"/>
                <text>
                  <text-style ref="ts{{ st.idx1 }}">{{ st.text|escXML }}</text-style>
                </text>
                <text-style-def id="ts{{ st.idx1 }}">
                  <text-style font="Helvetica" fontSize="60" fontFace="Regular" fontColor="1 1 1 1" alignment="center"/>
                </text-style-def>
              </title>
             {% endfor %}
            </gap>
          </spine>
        </sequence>
      </project>
    </event>
    <smart-collection name="Projects" match="all">
      <match-clip rule="is" type="project"/>
    </smart-collection>
    <smart-collection name="All Video" match="any">
      <match-media rule="is" type="videoOnly"/>
      <match-media rule="is" type="videoWithAudio"/>
    </smart-collection>
    <smart-collection name="Audio Only" match="all">
      <match-media rule="is" type="audioOnly"/>
    </smart-collection>
    <smart-collection name="Stills" match="all">
      <match-media rule="is" type="stills"/>
    </smart-collection>
    <smart-collection name="Favorites" match="all">
      <match-ratings value="favorites"/>
    </smart-collection>
  </library>
</fcpxml>
Marksdo commented 7 months ago

new template just remove these lines

       {{ durationSegLatest }}     
       {{ durationSegLatest|div:1000 }}
       {{ durationSegLatest|div:1000|m:$frds }}
       {{ durationSegLatest|div:1000|m:$frds|round:-1 }}
       {{ $fr1s }} 
wqwe2 commented 7 months ago

I do not see

{{ durationSegLatest }}
{{ durationSegLatest|div:1000 }} {{ durationSegLatest|div:1000|m:$frds }} {{ durationSegLatest|div:1000|m:$frds|round:-1 }} {{ $fr1s }}

but it seems it worked? as I finished this project, let me try this template for my next project. thank you

Marksdo commented 7 months ago

Thank you for assisting in troubleshooting the issue. 🙏