Html 400使用Google语音到文本API时出错

Html 400使用Google语音到文本API时出错,html,speech-to-text,Html,Speech To Text,我已经创建了一个html表单,它将.flac文件发布到google Speech to text API。 我的代码如下 <head> <meta http-equiv="Content-Type" content="audio/x-flac; rate=16000"> </head> <body> <form method=POST action="http://www.google.com/speech-api/v1/recognize?

我已经创建了一个html表单,它将.flac文件发布到google Speech to text API。 我的代码如下

<head>
<meta http-equiv="Content-Type" content="audio/x-flac; rate=16000">
</head>
<body>
<form method=POST action="http://www.google.com/speech-api/v1/recognize?lang=en-us&client=chromium">
<input type="file">
<input type=submit value=submit>
</form>
</body>

但每当我发布音频,谷歌都会回应 400。那是个错误。 您的客户端发出了格式错误或非法的请求。内容类型应为:音频/xxx;速率=yyy

我需要解决办法。

“400。那是€”™这是个错误

您的客户端发出了格式错误或非法的请求。缺少参数:key That€™这就是我们所知道的。”

这就是我得到的。我甚至发送了一个带有密钥的请求,但仍然是400,只是没有“缺少参数:密钥”部分