I record with a Sony digital voice recorder, the ICD-UX570. It has a nice “T-mark” button to create a track mark at the current recording position. What this actually does is write a timestamp into a file that’s named the same as your recording but with a “.tmk” extension. (It’s technically a binary format, but it’s just a few magic bytes to identify the file, then a simple “[minutes:seconds]” on each line.)
I couldn’t find an existing plug-in to import these as Audacity labels, so I thought I’d give it a try. I haven’t used Audacity for very long, nor have I written anything real in Lisp before, so the code might be gnarly, but it seems to work in my testing. It’s based on the standard file button tutorial but with the Sony magic added.
Usage note: the timestamps are relative to the start of the file, so you’ll want to select the whole file before running the plugin.
I think any open-source license is fine. GPL v2, v3, or v2+ are all fully compatible with Audacity’s license. I usually go with GPL v2+ (version 2 or later). I’m not a lawyer, but I doubt there is any problem regarding Sony’s license / patents as you’re only using data from your recorded files.
I can’t test the plug-in as I don’t have a Sony voice recorder, but one thing that I’d suggest is to put all of the plug-in “header” lines at the top, like this:
;; Tested with Audacity 3.4.2.
;; Based on https://plugins.audacityteam.org/...
;;
;; This plugin imports track markers from a a .tmk file, as generated by Sony
;; voice recorders when hitting their "T-mark" button.
;; ...
This change makes no difference to the functionality - it’s just a matter of convention.
I wasn’t concerned about Sony (there’s nothing proprietary here) but rather the fact that I used code from the tutorial directly, and the tutorial page doesn’t list a license for that code, so I’m not sure how I’m allowed to license this. If the examples are GPL2, that’s fine, but sometimes documentation uses licenses that aren’t typically used for code, and I’m not sure about compatibility.
Oh, right! I should have included a sample file. I’ll attach a simple one here with four track marks. (It’s renamed to .txt because .tmk isn’t allowed; just remove the .txt.) 240117_2144.tmk.txt (63 Bytes)
Thanks for the suggestions! I’ll add those and upload a new version, maybe after I’m clear about the licensing.
Not a problem. I wrote that code for the Audacity wiki and it was intended to provide Audacity users with a starting point for writing their own code. I’m pleased to see that it is still useful. I prefer that my documentation is used for open-source because I’m a supporter of open-source, but it is not required.
The Audacity wiki was licensed under Attribution 3.0, so if you republish the documentation, it needs to be attributed (see the link for details).
Thanks for the sample .tmk file. The plug-in works as expected here on Linux with Audacity 3.5.0 alpha.
Another suggestion that I’d make is in file widget, provide an “All files” option. (That would have saved me having to remove the .txt extension).
Hi, appreciate any help. I have no idea what the discussion above means but it sounds like you are familiar with Sony tmk files. For some reason my Sony digital recorder recorded some audio files as a tmk format. I can’t access the file and I need the data!!! Trying many 3rd party apps that don’t recognize TMK. I am fairly desperate. Can you help?? Thank you?
The files ending ".tmk"just contain timing information, not audio.
There should be a much bigger file with a similar name to the one ending “.tmk” which contains the audio in a proprietary Sony audio format.
Sony software can convert it into WAV format which is universally supported …
@Greta Like Trebor said, you should see the audio file right next to the tmk file. The tmk file should be small in size, nowhere near big enough to hold the audio. If you open it in a text editor, you should see a few characters of gibberish at the start, and then some timestamps. It’s not the actual audio.
contains the audio in a proprietary Sony audio format.
Not necessarily - it depends on the recorder. Mine can only record in WAV and MP3, no Sony-proprietary formats.
Redshift,
Thanks for developing and sharing this plug-in!
Third time I ran it, I got stopped with:
“Invalid character ‘1’; expecting [number:number]”
Any guidance?
If the .tmk file is small (it should be pretty small) can you post it here? You may have to rename it to .txt so the forum lets you upload it.
Basically, after confirming the Sony header (which it did) the code checks each character to make sure it’s part of the expected format, which is just a list of “[number:number]” that it can take timestamps from. Yours might be missing a bracket, or something like that.
You can see that it has extra timestamps at the end of some lines. I’m not sure why, but I assume Sony changed the format at some point. What kind of device are you getting it from?
I was barely able to get the original to work, so I’m not sure how to modify it to handle (sometimes) seeing extra data. If you remove the extra timestamps (make sure to edit and save in binary mode in your text editor) that should work, or maybe someone more experienced with Audacity programming could modify the plugin to handle it automatically?
I’m glad that worked! Unfortunately, I have no idea why those extra timestamps were there - you have the same device I do, and I haven’t seen that. Hopefully it doesn’t happen again, but at least you have a workaround if it does. If it keeps happening, maybe someone could help tweak the code to ignore the extra timestamps.