You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when using client.upload_audio(), the ragas parameter in AudioMetadata expects a specific structure that is not well documented or validated:
The ragas array should contain objects where the key is the raga name string
Each raga object should have a performance_sections key with an empty object {} as the default value
Automatically convert to the expected internal structure
Examples:
# Allow simple stringsragas=["Rageshree", "Yaman"]
# Allow name-based objects ragas=[Raga("Rageshree"), Raga("Yaman")]
# Still support current formatragas=[{"Rageshree": {"performance_sections": {}}}]
Context
This issue was discovered while updating upload scripts where the intuitive Raga({"name": "Rageshree"}) pattern was used but doesn't work with the current API expectations. Testing with plain dictionaries also fails with 'dict' object has no attribute 'to_json' errors, indicating the API expects objects with specific methods.
Priority
This issue is blocking current upload functionality and needs to be addressed to enable proper raga metadata uploads.
Issue Description
Currently, when using
client.upload_audio(), theragasparameter inAudioMetadataexpects a specific structure that is not well documented or validated:performance_sectionskey with an empty object{}as the default value[{"Rageshree": {"performance_sections": {}}}]Current Problems
Raga({"name": "Rageshree"})or similar patterns'dict' object has no attribute 'to_json'errors during uploadProposed Solutions
Consider one or both of these approaches:
Option 1: Add validation in
upload_audio()Option 2: Provide syntactic sugar
Context
This issue was discovered while updating upload scripts where the intuitive
Raga({"name": "Rageshree"})pattern was used but doesn't work with the current API expectations. Testing with plain dictionaries also fails with'dict' object has no attribute 'to_json'errors, indicating the API expects objects with specific methods.Priority
This issue is blocking current upload functionality and needs to be addressed to enable proper raga metadata uploads.