Parsing audio_id from TAF file

I’m trying to script the creation of at least parts of tonies.custom.json. I found the SHA in the header, but not the audio ID. According to the proto/toniebox.pb.taf-header.proto it should be contained, but I can’t find it. What am I missing?

What I did:

  • selecting an existing Tonie in teddycloud
  • get the audio_id from the details view
  • check in tonies.json if the audio_id is the audio_id found in the json
  • Convert the audio ID to hex representation
  • Search for those bytes in hexdump of the head of the corresponding TAF file

Off topic: When creating custom tonies, can I set the modelId to any string?

The audio ID is the timestamp:

Is this what you wanted to know? If not, sorry, than I didn’t get your question (lack of Wurst english skills).

I’m aware that’s the audio ID. I don’t want to copy&paste 100 audio IDs from the GUI to manually edit a json file, but want to read that value from the TAF file.

To help understand my problem:
Ich möchte (u.A.) die audio_id aus dem TAF file per Skript auslesen, um mir eine größere tonies.custom.json zusammen zu bauen. Um bei deinem Beispiel zu bleiben: Ich finde “Hash” im TAF file, aber nicht 1705863575. Ich suche im hexdump des headers nach 0x65AD6997 (die hex Repräsentation der audio id) und finde nichts, auch nicht in anderer Reihenfolge. Dem Quelltext der Teddycloud entnehme ich, dass die audio_id eigentlich im Header enthalten sein müsste. Und von irgendwo muss die ja kommen. Jetzt suche ich Rat :wink:

You’ll need to parse the header with protobuf.

It just has to be unique

1 Like

Isn’t protobuf just a tool that helps parsing stuff? If not I now know why I have a feeling that I’m missing something :smile:

Okay got it, I really misinterpreted what protobuf is doing. Even found part of what I need in opus2tonie, so I can recycle that.