Skip to content

Commit

Permalink
[Feat] update api to match internal proto (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
jyoo0515 authored Feb 21, 2024
1 parent c8e2c67 commit b8ee5ba
Show file tree
Hide file tree
Showing 7 changed files with 174 additions and 142 deletions.
20 changes: 10 additions & 10 deletions ai/internal_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions ai/internal_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@ class PronunciationFeedbackRequest(_message.Message):
def __init__(self, sentence: _Optional[str] = ..., audio_path: _Optional[str] = ..., tip: _Optional[str] = ...) -> None: ...

class PronunciationFeedbackResponse(_message.Message):
__slots__ = ("transcript", "incorrect_indexes", "pronunciation_score", "decibel", "speech_rate", "positive_feedback", "negative_feedback")
__slots__ = ("transcript", "incorrect_indexes", "pronunciation_score", "volume_score", "speed_score", "positive_feedback", "negative_feedback")
TRANSCRIPT_FIELD_NUMBER: _ClassVar[int]
INCORRECT_INDEXES_FIELD_NUMBER: _ClassVar[int]
PRONUNCIATION_SCORE_FIELD_NUMBER: _ClassVar[int]
DECIBEL_FIELD_NUMBER: _ClassVar[int]
SPEECH_RATE_FIELD_NUMBER: _ClassVar[int]
VOLUME_SCORE_FIELD_NUMBER: _ClassVar[int]
SPEED_SCORE_FIELD_NUMBER: _ClassVar[int]
POSITIVE_FEEDBACK_FIELD_NUMBER: _ClassVar[int]
NEGATIVE_FEEDBACK_FIELD_NUMBER: _ClassVar[int]
transcript: str
incorrect_indexes: _containers.RepeatedScalarFieldContainer[int]
pronunciation_score: float
decibel: float
speech_rate: float
pronunciation_score: int
volume_score: int
speed_score: int
positive_feedback: str
negative_feedback: str
def __init__(self, transcript: _Optional[str] = ..., incorrect_indexes: _Optional[_Iterable[int]] = ..., pronunciation_score: _Optional[float] = ..., decibel: _Optional[float] = ..., speech_rate: _Optional[float] = ..., positive_feedback: _Optional[str] = ..., negative_feedback: _Optional[str] = ...) -> None: ...
def __init__(self, transcript: _Optional[str] = ..., incorrect_indexes: _Optional[_Iterable[int]] = ..., pronunciation_score: _Optional[int] = ..., volume_score: _Optional[int] = ..., speed_score: _Optional[int] = ..., positive_feedback: _Optional[str] = ..., negative_feedback: _Optional[str] = ...) -> None: ...

class CommunicationFeedbackRequest(_message.Message):
__slots__ = ("context", "question", "expected_answer", "audio_path", "img_path")
Expand Down
4 changes: 2 additions & 2 deletions ai/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ def PronunciationFeedback(self, request, context):
transcript=feedback["transcription"],
incorrect_indexes=feedback["incorrect_indexes"],
pronunciation_score=feedback["pronunciation_score"],
decibel=feedback["decibel"],
speech_rate=feedback["speech_rate"],
volume_score=feedback["volume_score"],
speed_score=feedback["speed_score"],
positive_feedback=feedback["positive-feedback"],
negative_feedback=feedback["negative-feedback"]
)
Expand Down
130 changes: 81 additions & 49 deletions gen/proto/feedback.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b8ee5ba

Please sign in to comment.