renator's picture
Updated
99122b8
raw
history blame contribute delete
834 Bytes
from django.db import models
from accounts.models import User
# Create your models here.
class BaseModel(models.Model):
created_by = models.ForeignKey(
User, on_delete=models.CASCADE, related_name="%(class)s_created_by"
)
created_date = models.DateTimeField(auto_now_add=True)
class Meta:
abstract = True
ordering = ["-created_date"]
class TextToSpeech(BaseModel):
text = models.TextField(
default="In the quest for a sustainable future, renewable energy emerges as a beacon of hope"
)
speaker_wav = models.TextField()
output_wav = models.TextField()
language = models.CharField(
max_length=2, # Adjust the max length based on your language code requirements
default="en"
)
def __str__(self):
return f"TextToSpeech ID: {self.id}"