I previously added an interface that GCPService could implement so the sockets handlers and whatever service they use to to process audio data aren't tightly coupled.
There is a similar coupling going on with the APIRouter used for the REST endpoints:
@router.get("/getSupportedLanguages")
async def get_supported_languages():
return GCPService.get_supported_languages()
Let's do the same thing here:
- Create an interface, like
IRestService or something
- Have
GCPService implement that one too
- Refactor
APIRouter to interact with the interface instead of GCPService