我应该使用哪些技术来开发语音相关应用程序

发布于 2024-12-04 02:49:46 字数 205 浏览 0 评论 0原文

我想开发一款记录语音消息并存储在云端的应用程序。

它的工作原理如下:

1)用户拨打手机并录制消息。

2) 录制的语音消息/语音邮件应可供所有其他用户以及用户电话号码通过网络/在线访问/使用。

对于网络,我可以使用 PHP/python。

但我不知道如何通过网络/云保存语音邮件/语音消息。

请帮我

I would like to develop one application which record voice messages and stores in cloud.

it works like this

1) user calls mobile phone and record message.

2) The recorded voice message/voice mail should be accessible/avialable to all other users along with user phone number through web/online.

for web i can use PHP/python.

but i dont know how to save voicemail/voice message over web/cloud.

Please help me

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

想念有你 2024-12-11 02:49:46

为什么不使用 TwilioTropo该领域的其他提供商之一< /a> 来完成你所需要的无需保护实际的语音线路、硬件等?

Twilio 有一个示例语音邮件应用程序,这可能是您项目的良好开端。

如果您需要从电话提供商访问语音邮件,则会有特定于提供商的详细信息,因此您应该更新您的帖子以包含有关您想要定位的提供商的信息(如果该提供商位于多个市场,则可能还包括地理信息) 。

Why not use Twilio, Tropo or one of the other providers in this space to accomplish what you need without having to secure actual voice lines, hardware, etc.?

Twilio has an example voicemail application that might be a good start for your project.

If you need to access the voicemail from a phone provider there is going to be provider-specific details so you should update your post to include information on what provider you want to target (and perhaps include geographical information if that provider is in multiple markets).

十年九夏 2024-12-11 02:49:46

我建议使用 Tropo 脚本。特别是,请查看他们的示例,其中显示了进行录音的语音邮件系统和转录。

不久前,我编写了一个简单的 Sinatra 应用程序来获取 Tropo 录音并将其放入 Amazon S3 存储桶中。从那里,您可以随心所欲地使用它们。

%w(rubygems sinatra yaml logger aws/s3).each do |lib|
  require lib
end

# Open configuration file and connect to Amazon
AWS_CONFIG = YAML.load(File.open('config/amazon_s3.yml'))
AWS::S3::Base.establish_connection!(
  :access_key_id     => AWS_CONFIG['access_key_id'],
  :secret_access_key => AWS_CONFIG['secret_access_key']
)

# Exception class with HTTP error codes
class HTTPError < StandardError
  attr_reader :code
  def initialize(message, code = 500)
    super(message)
    @code = code
  end
end

# Put an uploaded file on S3
def handle_post(params)
  params['bucket'] ||= AWS_CONFIG['default_bucket']

  raise HTTPError.new("invalid token", 403) if params['token'] != AWS_CONFIG['api_token']
  raise HTTPError.new("missing filename", 400) unless params['name']
  raise HTTPError.new("bucket #{params['bucket']} is not allowed", 403) unless AWS_CONFIG['allowed_buckets'].include? params['bucket']

  AWS::S3::S3Object.store(params['name'],
                          File.open(params['filename'][:tempfile].path),
                          params['bucket'])
rescue HTTPError => ex
  error(ex.code)
rescue => ex
  puts ex
  error(500)
end


# Method that receives the file and sends to S3
# /save-to-s3?token=<token>[&bucket=<one-of-allowed-buckets>]&name=filename
post '/save-to-s3' do
  handle_post(params)
end

我在 Heroku 上运行该应用程序,因此我添加了一个简单的 config.ru 文件,以便它可以被识别为 Rack 应用程序。

require 'tropo-audiofiles-to-s3'
run Sinatra::Application 

您不必使用 Ruby。 Tropo 脚本处理多种语言(它们都在 JVM 上运行,因为 Tropo 是在 Voxeo 的应用程序服务器上构建的),您也可以处理任何语言的文件上传。

祝你好运。

I'd recommend Tropo scripting for that. In particular, take a look at their example that shows a voicemail system that does recording and transcription.

A while back I put together a simple Sinatra app to take Tropo recordings and put them in an Amazon S3 bucket. From there, you can use them anyway you want.

%w(rubygems sinatra yaml logger aws/s3).each do |lib|
  require lib
end

# Open configuration file and connect to Amazon
AWS_CONFIG = YAML.load(File.open('config/amazon_s3.yml'))
AWS::S3::Base.establish_connection!(
  :access_key_id     => AWS_CONFIG['access_key_id'],
  :secret_access_key => AWS_CONFIG['secret_access_key']
)

# Exception class with HTTP error codes
class HTTPError < StandardError
  attr_reader :code
  def initialize(message, code = 500)
    super(message)
    @code = code
  end
end

# Put an uploaded file on S3
def handle_post(params)
  params['bucket'] ||= AWS_CONFIG['default_bucket']

  raise HTTPError.new("invalid token", 403) if params['token'] != AWS_CONFIG['api_token']
  raise HTTPError.new("missing filename", 400) unless params['name']
  raise HTTPError.new("bucket #{params['bucket']} is not allowed", 403) unless AWS_CONFIG['allowed_buckets'].include? params['bucket']

  AWS::S3::S3Object.store(params['name'],
                          File.open(params['filename'][:tempfile].path),
                          params['bucket'])
rescue HTTPError => ex
  error(ex.code)
rescue => ex
  puts ex
  error(500)
end


# Method that receives the file and sends to S3
# /save-to-s3?token=<token>[&bucket=<one-of-allowed-buckets>]&name=filename
post '/save-to-s3' do
  handle_post(params)
end

I run the app on Heroku, so I added a simple config.ru file so that it can be recognized as a Rack app.

require 'tropo-audiofiles-to-s3'
run Sinatra::Application 

You don't have to use Ruby. Tropo scripting handles many languages (they all run on a JVM because Tropo is built on Voxeo's app server) and you can handle the file uploads in any language as well.

Good luck.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文