2

Help with Transcribing Audio

 2 years ago
source link: https://forums.macrumors.com/threads/help-with-transcribing-audio.2355299/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Help with Transcribing Audio

HighTime

macrumors regular

Original poster

Sep 20, 2014
Hello folks,

I currently have some videos which I need to translate on the fly and transcribe. I play them in IINA and sometimes some of them even in Youtube itself and can stop and pause using the play/pause button on the keyboard while I am still in Word typing everything out. Pausing and playing is fine since I can do that while I am still in Word so it doesn't mess the flow up.

Problem is if I need to go back a few seconds to repeat what was said in case I never caught it properly I have to click out of Word and into IINA/Youtube and then press the back arrow to hear it again and then switch back over to Word. So my question is, is there any way I can control all aspects of the audio without having to leave Word or the program I am typing in? The main function I need really is just to be able to go back [don't really need to jump forward for example] a few seconds with a keyboard click like the pause/play button without having to leave Word. The best option would be to be able to use the 'rewind' key on the left of the play key on the keyboard, that would be perfect.

Any ideas?

Thank you.
Last edited: Saturday at 2:17 AM

bogdanw

macrumors 68020
Mar 10, 2009 2,094 1,010
You can create a QuickAction in Automator, with AppleScript to press left arrow, and set a shortcut for it.
https://support.apple.com/guide/automator/aut73234890a/mac
https://support.apple.com/guide/mac-help/use-services-in-apps-mchlp1012/mac
AppleScript:
Code:
tell application "IINA" to activate
tell application "System Events" to key code 123
tell application "Microsoft Word" to activate
IINA can also play YouTube videos.
iina.jpg

HighTime

macrumors regular

Original poster

Sep 20, 2014
You can create a QuickAction in Automator, with AppleScript to press left arrow, and set a shortcut for it.
https://support.apple.com/guide/automator/aut73234890a/mac
https://support.apple.com/guide/mac-help/use-services-in-apps-mchlp1012/mac
AppleScript:
Code:
tell application "IINA" to activate
tell application "System Events" to key code 123
tell application "Microsoft Word" to activate
IINA can also play YouTube videos.
View attachment 2045127
Many thanks for your reply @bogdanw, but that is not doing anything for me? I think i got it set up right as you have it above but then if I run click run from the automator all all it does is bring Word to the forefront, but the rewind key (F7) still doesn't skip the audio back. I see you have it set for the left arrow key. I am pretty sure I am missing some steps or something since I've never used automator before.

bogdanw

macrumors 68020
Mar 10, 2009 2,094 1,010
I see you have it set for the left arrow key.
That is the default in IINA
IINAKeys.jpg

You would like to use F7?

bogdanw

macrumors 68020
Mar 10, 2009 2,094 1,010
From https://eastmanreference.com/complete-list-of-applescript-key-codes
key code for F7 is 98, so AppleScript:
Code:
tell application "IINA" to activate
tell application "System Events" to key code 98
tell application "Microsoft Word" to activate
Reactions: HighTime

HighTime

macrumors regular

Original poster

Sep 20, 2014
I actually googled and came across the codes on that page and did try key code 98 but I still can't get it to work.

I think my problem is how do I actually activate that script? How do I run it when I am typing? At the moment all it does if I press F7 is jump back a whole track and not skip backwards 5s?

This script you have written above, what does it do actually, skip back or just bring Word to the fore? Sorry about my lack of skills in this man.

bogdanw

macrumors 68020
Mar 10, 2009 2,094 1,010
I’ll try to describe the whole process in more detail:
1. Open Automator (/Applications/Automator.app), New – QuickAction
- For “Workflow receives current” select “no input”, for in select Microsoft Word, or the app you are using for writing.
- From the left menu, search for AppleScript and drag it into the right side
- copy paste the AppleScript into to window as in the image above
- save the QuickAction with a name, let’s say IINA
2. Open System Preferences, Keyboard, Shortcuts, Services and look for the newly created IINA service. It should be at the end of the list.
- click on the right side to add a shortcut, press a combination of keys you want to use while in Word to skip IINA back 5 seconds.
3. Open a video/audio file in IINA, open Word and press the stortcut defined above. MacOS will ask you to give Word permission to control “System Events“. Give the permission in System Preferences, Security & Privacy, Privacy – Accessibility by checking Word.

After that, when you are in Word and press the defined shorcut, the QuickAction will activate IINA, press the key for back 5 seconds (or whatever time you define in IINA preferences) and return to Word so that you can continue writing. This should happen instantly.
Reactions: HighTime

HighTime

macrumors regular

Original poster

Sep 20, 2014
I’ll try to describe the whole process in more detail:
1. Open Automator (/Applications/Automator.app), New – QuickAction
- For “Workflow receives current” select “no input”, for in select Microsoft Word, or the app you are using for writing.
- From the left menu, search for AppleScript and drag it into the right side
- copy paste the AppleScript into to window as in the image above
- save the QuickAction with a name, let’s say IINA
2. Open System Preferences, Keyboard, Shortcuts, Services and look for the newly created IINA service. It should be at the end of the list.
- click on the right side to add a shortcut, press a combination of keys you want to use while in Word to skip IINA back 5 seconds.
3. Open a video/audio file in IINA, open Word and press the stortcut defined above. MacOS will ask you to give Word permission to control “System Events“. Give the permission in System Preferences, Security & Privacy, Privacy – Accessibility by checking Word.

After that, when you are in Word and press the defined shorcut, the QuickAction will activate IINA, press the key for back 5 seconds (or whatever time you define in IINA preferences) and return to Word so that you can continue writing. This should happen instantly.
You are the man. Sorted. Many thanks for taking all that time out to help.

HighTime

macrumors regular

Original poster

Sep 20, 2014
One more question, how do I add another program to that Quick Action in Automator? Like Word and Pages for example? Do I have to create another Quick action or can I combine them in that initial one?

Thanks again.

bogdanw

macrumors 68020
Mar 10, 2009 2,094 1,010
If the combination of keys you used for the shortcut is not in use in other apps, you can select “any application” instead of Microsoft Word. Open Automator, File – Open Recent – and edit the QuickAction.
Reactions: HighTime

HighTime

macrumors regular

Original poster

Sep 20, 2014
If the combination of keys you used for the shortcut is not in use in other apps, you can select “any application” instead of Microsoft Word. Open Automator, File – Open Recent – and edit the QuickAction.
Perfect. Thanks man.

bogdanw

macrumors 68020
Mar 10, 2009 2,094 1,010
Perfect. Thanks man.
I’ve just realized that it’s not going to work, because it will bring back Word.
Best to create another QuickAction for Pages.

HighTime

macrumors regular

Original poster

Sep 20, 2014
I’ve just realized that it’s not going to work, because it will bring back Word.
Best to create another QuickAction for Pages.
Ok cool, that's fine.

bogdanw

macrumors 68020
Mar 10, 2009 2,094 1,010
This AppleScript should work for any application:
Code:
set ActiveApp to short name of (info for (path to frontmost application))
tell application "IINA" to activate
tell application "System Events" to key code 123
tell application ActiveApp to activate
You have to give permission to control “System Events” for every app in which you use it.
Reactions: HighTime

HighTime

macrumors regular

Original poster

Sep 20, 2014
This AppleScript should work for any application:
Code:
set ActiveApp to short name of (info for (path to frontmost application))
tell application "IINA" to activate
tell application "System Events" to key code 123
tell application ActiveApp to activate
You have to give permission to control “System Events” for every app in which you use it.
Just tried it, works great. Many thanks for all your help!
Reactions: bogdanw
Hello folks,

I currently have some videos which I need to translate on the fly and transcribe. I play them in IINA and sometimes some of them even in Youtube itself and can stop and pause using the play/pause button on the keyboard while I am still in Word typing everything out. Pausing and playing is fine since I can do that while I am still in Word so it doesn't mess the flow up.

Problem is if I need to go back a few seconds to repeat what was said in case I never caught it properly I have to click out of Word and into IINA/Youtube and then press the back arrow to hear it again and then switch back over to Word. So my question is, is there any way I can control all aspects of the audio without having to leave Word or the program I am typing in? The main function I need really is just to be able to go back [don't really need to jump forward for example] a few seconds with a keyboard click like the pause/play button without having to leave Word. The best option would be to be able to use the 'rewind' key on the left of the play key on the keyboard, that would be perfect.

Any ideas?

Thank you.
hey, we are currently developing a tool which will allow to transcribe audio or video and translate it to different languages. seems like it's close to what you are trying to do. would you like to be a beta tester?

HighTime

macrumors regular

Original poster

Sep 20, 2014
hey, we are currently developing a tool which will allow to transcribe audio or video and translate it to different languages. seems like it's close to what you are trying to do. would you like to be a beta tester?
Hello, sounds interesting, not sure how much time I will have but I'm willing to give it a go.

HighTime

macrumors regular

Original poster

Sep 20, 2014
Hey @bogdanw, sorry to hassle you again but I seem to have messed some setting up or something. What's happening is the Applescript shortcut is working with everything except the one program I need it for most, Scrivener, more than Word, and which was the reason I posted here. So all other programs have no issue with implementing the rewind shortcut, except for Scrivener, which is just implementing the actual keyboard shortcut for what it is already assigned as a default in Scrivener. It was working before and I think I must've messed some setting up.

I just deleted Scrivener preferences from the Library and rebooted to see if that would work but no luck.

Any ideas?
Hello, sounds interesting, not sure how much time I will have but I'm willing to give it a go.
if you decide to try, please message me at nazim at kukarella.com

bogdanw

macrumors 68020
Mar 10, 2009 2,094 1,010
Any ideas?
Hello @HighTime,
Check in System Preferences – Security & Privacy – Privacy – Automation if Scrivener has permission to control other apps.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK