feat(api): add backend
routes and WebSockets
This commit is contained in:
14
services/api/app/models/audio_data.py
Normal file
14
services/api/app/models/audio_data.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from sqlalchemy import Boolean, Integer, Float
|
||||
from sqlalchemy.dialects.postgresql import TIMESTAMP
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from app.db.base import Base
|
||||
|
||||
|
||||
class AudioData(Base):
|
||||
__tablename__ = "audio_data"
|
||||
|
||||
time: Mapped[object] = mapped_column(TIMESTAMP(timezone=True), primary_key=True)
|
||||
rms_db: Mapped[float] = mapped_column(Float, nullable=False)
|
||||
frequency_hz: Mapped[int] = mapped_column(Integer, nullable=False)
|
||||
is_silence: Mapped[bool] = mapped_column(Boolean, nullable=False, default=False)
|
||||
Reference in New Issue
Block a user