{
    "openapi": "3.0.0",
    "info": {
        "title": "语音垃圾分类 - API文档",
        "version": "1.0.0",
        "description": "语音识别垃圾分类API接口，其中say参数必须为语音文件的数据流。长度不超过60s，大小不超过1M。确保单声道、采样率16000，标准普通话、尽量言简意赅、支持pcm\/wav\/amr\/m4a格式。请用post方式上传语音文件数据流，上传文件的enctype必须为multipart\/form-data。完整demo项目：<a target=\"_blank\" href=\"https:\/\/www.tianapi.com\/article\/99\">微信小程序语音识别参考代码<\/a>"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/voicelajifenlei\/index": {
            "post": {
                "summary": "语音垃圾分类",
                "tags": [
                    "语音垃圾分类"
                ],
                "description": "根据语音查询物品垃圾分类信息",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "say": {
                                        "type": "file",
                                        "example": "二进制流",
                                        "description": "语音文件数据流"
                                    },
                                    "format": {
                                        "type": "string",
                                        "example": "wav",
                                        "description": "语音数据格式：pcm,wav,amr,m4a，建议pcm"
                                    }
                                },
                                "required": [
                                    "key",
                                    "say",
                                    "format"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "name": {
                                            "type": "string",
                                            "example": "塑料袋",
                                            "description": "识别到垃圾名称"
                                        },
                                        "lajitip": {
                                            "type": "string",
                                            "example": "塑料袋是其它干垃圾，常见包括砖瓦陶瓷、卫生间废纸、猫砂、毛发、一次性制品等......",
                                            "description": "分类提示"
                                        },
                                        "lajitype": {
                                            "type": "int",
                                            "example": 3,
                                            "description": "垃圾分类，0为可回收、1为有害、2为厨余(湿)、3为其他(干)、4无法判别"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "name": "塑料袋",
                                                "lajitip": "塑料袋是其它干垃圾，常见包括砖瓦陶瓷、卫生间废纸、猫砂、毛发、一次性制品等。投放时应尽量沥干水分、平整轻放。",
                                                "lajitype": 3
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}